Xcode: two Apps with a shared private Framework, in a WorkSpace
I’ve been working on a reasonably large iOS project that has ended up consisting of multiple, related, iOS apps for which I’ve wanted to share a large amount of code through the use of shared, private, frameworks. This seems like it should be simple, but instead I’ve run into all kinds of issues.
When building, you might end up with a warning about a missing directory:
ld: warning: directory not found for option '-F…/build/Debug-iphoneos'
When trying to start the app in the iOS Simulator, without Xcode attached, it might crash with the error image not found:
Dyld Error Message: Library not loaded: @rpath/….framework/… Referenced from: …/Library/Developer/CoreSimulator/Devices/… Reason: image not found
If you try and run the app on a iOS device at all, whether with Xcode attached or not, you might also end up with an image not found error:
dyld: Library not loaded:
Continue reading →