I am trying to use the PLDatabase framework in my iPhone app. I’ve added the framework to my Xcode project. However, when I run my app, it crashes with the following error:
dyld: Library not loaded: @loader_path/../Frameworks/PlausibleDatabase.framework/Versions/A/PlausibleDatabase Referenced from: /Users/todd/Library/Application Support/iPhone Simulator/User/Applications/BB3C66B2-A5BB-4329-B163-AB0072411AF1/Congress.app/Congress Reason: image not found
I’m not sure exactly where the Framework needs to reside on disk to be found.
Thanks
iPhone does not support dynamic linking of embedded frameworks. While you might be able to finagle the simulator to work, it will not work on the device. If you want to use the code you must build the static library for the framework (libpldatabase.a), and then link them to the app.
The Xcode GUI does not provide a nice interface for static linking, you will need to add appropriate flags in your build prefs (-lpldatabase -L/whatever/dir/it/is/in).