I'm having a lot of trouble getting a macOS audiokit project to run properly.
I've cloned the repo and opened one of the example projects - examples/macOS/HelloWorld. It builds fine, with no errors, but then when I try to run it I get this error:
dyld: Library not loaded: #rpath/AudioKitUI.framework/Versions/A/AudioKitUI
which is reasonable since the readme says that the UI Framework has to listed in the embedded binaries list. So I update my project to include AudioKitUI.framework in the embedded binaries list, rebuild and run, then I get a bunch of errors like this:
Class <AudiokitUI classes> is implemented in both <.../Build/Products/Debug/HelloWorld.app/Contents/Frameworks/AudioKitUI.framework/Versions/A/AudioKitUI> and <.../Build/Products/Debug/HelloWorld.app/Contents/MacOS/HelloWorld>
I'm using:
xcode 10.0
macOS v10.13.6
I've just installed xcode for this project, and I haven't changed any of the defaults.
Related
I made a simple blank project and added Bugsee via swift-package-manager.
Its located on https://github.com/bugsee/spm.
I can successfully build project for iOS Device.
But it fails for Simulator. And the error is not really verbose
(the path is shortened):
Cannot open file handle for file at path: Path(str: ".../Bugsee.xcframework/ios-arm64_i386_x86_64-simulator/Bugsee.framework")
What does it mean?
The path is valid and the framework is there:
I also found that build for simulator is OK after I have added Bugsee.xcframework into Frameworks, Libraries, and Embedded Content.
Does anyone know what's wrong?
It looks like SPM in Xcode have an issue with i386 arch.
Bugsee released 1.28.0 with dropped support for i386 arch. And now Xcode starts building fine for simulator.
I think i should create a ticket in SPM tracker.
Ever since I switched to Yosemite, I have been getting an Xcode quit unexpectedly error whenever I try to run SDL2. I can't even get a "hello world" to run.
I am trying the fix it by following the directions on this page:
Xcode 5 crashes when running an app with SDL 2
But I don't know how to "Compile the "Framework" target in Xcode/SDL/SDL.xcodeproj" I tried just simply building it but that doesn't seem to work because I don't see any framework file showing up.
Can someone help me figure out how to get rid of this error?
I assume you have got the latest version of the code either by doing hg clone http://hg.libsdl.org/SDL or by downloading the latest snapshot from https://www.libsdl.org/hg.php
This should give you a directory called SDL which contains the source and all of the projects. You will want to open 'Xcode/SDL/SDL.xcodeproj'
Then ensure the following is set as your build target - Framework > My Mac (64-bit) You can change it by clicking on it.
Then hit CMD+B (or select Product->Build from the menu) to build the framework. You will then be able to find the SDL2.framework in the following location:
/Users/*yourusername*/Library/Developer/Xcode/DerivedData/SDL2-*randomstring*/Build/Products/<*Debug/Release*>
Copy the framework to /Library/Frameworks
I have an OSX app and I have added the ParseOSX sdk. I have followed all the instructions on the quick start page (https://www.parse.com/apps/quickstart#parse_data/desktop/osx/existing)
The app is running fine in Xcode (Version 5.1.1 (5B1008)) but when I archive and create a package and install this. I get the following Dyld error;
Dyld Error Message:
Library not loaded: #executable_path/../Frameworks/ParseOSX.framework/ParseOSX
Referenced from: /Applications/MyApp.app/Contents/MacOS/MyApp
Reason: image not found
It goes on and lists the Binary Images loaded.
Searching the web I found reference to adding a copy files build phase and adding the parse framework to that with the destination set to Products directory.
So it appears there is a dynamic lib not being installed somewhere.
UPDATE:
I just cleaned the build folder and now the app will not even run under Xcode. I get:
dyld: Library not loaded: #executable_path/../Frameworks/ParseOSX.framework/ParseOSX
Referenced from: /Users/Ants/Library/Developer/Xcode/DerivedData/MyApp-hjrbgyhzpwnxhiaskxpojqyqxnvh/Build/Products/Debug/Actual.app/Contents/MacOS/MyApp
Reason: image not found
UPDATE 2:
It turns out when you are in the quick start page. If you chose the new app option you get a Xcode project. This compiles. Going through it I can see that there is is a Copy Files step that copies the ParseOSX.framework into the Frameworks destination. Tried this is my app and I now get a signing error
/Users/Ants/Library/Developer/Xcode/DerivedData/MyApp-hjrbgyhzpwnxhiaskxpojqyqxnvh/Build/Products/Debug/MyApp.app: code object is not signed at all
In subcomponent: /Users/Ants/Library/Developer/Xcode/DerivedData/MyApp-hjrbgyhzpwnxhiaskxpojqyqxnvh/Build/Products/Debug/MyApp.app/Contents/Frameworks/ParseOSX.framework
I ran into the same problem with xcode 6.1. Fixed it by adding ParseOSX.framework to "Embedded Binaries" on the general tab of the Targets page.
Two things fixed this for me.
First I needed to add a copy files section to the build phases and copy the ParseOSX.framework into the Frameworks destination.
And second, I needed to add --deep to the "Other Code Signing Flags" in the Code Signing section of Build Settings. It now signs the frameworks being copied it seems.
I was updating an existing parse project to the newest SDK (1.12.0) using Xcode 7.2 and ran into the same problem.
The solution for me was to set Runpath Search Paths to #executable_path/../Frameworks.
I found this by comparing the Starter project from Parse to my project.
We're trying to upload our OSX 10.9 Mac App with Xcode 5. It worked fine with Xcode 4 but now Apple seems to be more restrict with signing sub projects. We get the following error when uploading:
We're using a Core-project that are common for both iOS and OSX. This uses Core Data.
Following this answer https://stackoverflow.com/a/10507330/511299 the solution seems to be to convert our Core project to a static library. However when doing so, the app crashes as it seems that a static library can't include resources (core datas model is a resource).
Following this answer https://stackoverflow.com/a/4610584/511299 we got the app working again with the resource in bundle alongside a static library. However, point 5 states that you should include the bundle in you main project, which results in the same warning from Apple again :(
Any thoughts or ideas?
We finally solved it by copying the file from the Core project to the OSX project via a shell script. We added a "placeholder" xcdatamodeld so we could include it in the OSX project file Build phases / Compile sources. We then added a new "Run Script" with the following code before the "Compile sources" phase:
fromPath=${PROJECT_DIR}/../xxx-Core/xxx-Core-Shared/Resources/db/IBModel.xcdatamodeld
toPath=${PROJECT_DIR}/xxx-Mac/Resources/db/IBModel.xcdatamodeld
rm -rf $toPath
cp -r $fromPath $toPath
Before that we tried to "link" in the file from the Core project to the OSX project, but that did not seem to work. The xcdatamodeld file did not get compiled.
I made project with ImageMagick included. I installed it through macPorts, linked libraries and headers to my project. Everything worked. But when I try to launch my builded app on other computer, where ImageMagick is not installed, it doesn't even opens my app. Says that Os X version is incompatible. If I install ImageMagick to that computer, then app works OK. What should I do to make it working on computers where users does't have ImageMagick? I guess I have somehow to include headers and libraries to my project bundle. But how to do it in correct way to get working? I tried to copy headers and libraries to my project's bundle but then when I try to build it it says that Magick++.h is not found. Can somebody help me?
I added ImageMagick files from where macports installed it (/opt/local/lib/ and /opt/local/include) to my created folder named ImageMagick, then moved that folder to my project and added ImageMagick/** to Library Search Paths and Header Search Paths. Then removed ImageMagick through macports. Project builds successfully, but doesn't runs. It shows error in console:
dyld: Library not loaded: /opt/local/lib/libMagick++.5.dylib
Referenced from: /Users/development/Library/Developer/Xcode/DerivedData/OGL-cahltqazoqxhrthkxztsqyvvodge/Build/Products/Debug/OGL.app/Contents/MacOS/OGL
Reason: image not found
(lldb)
Libs added to Linked Frameworks and Libraries list is in my app's folder and added to my project. Why it searches for it in /opt/local/lib?