Copying dynamic library (.dylib) into a framework (.framework)
I have two XCode projects: a framework and a client application.
My application depends on my framework and everything works fine with that — the framework is being recompiled everytime the app is, the projects build paths are set correctly, it’s completely okay.
Now the framework started using 3rd party dylib file, and it’s linked against the dylib.
I’ve even added a build phase to copy that library into the framework’s resources dir.
When i’m trying to run the application, everything compiles correctly, then i get this:
dyld: Library not loaded: /usr/local/lib/libplplot.9.dylib
Referenced from: /Users/railsmaniac/Projects/Study/Calculus of >approximations/Builds/Debug/XNMaths.framework/Versions/A/XNMaths
Reason: image not found
How can i fix it?
Adding the library into client application’s resources doesn’t fix the problem.
I can just place the library into the required location, but i prefer to keep it IN the framework.
Is it possible?
Solutions Collect From Internet About “Copying dynamic library (.dylib) into a framework (.framework)”
It looks like your application is expecting the library to be found at a specific path on the system. If you are on OS 10.5+ you can use the new @rpath functionality to allow your application to link dynamically to your library.
See this post for further details. It also shows the “old” way of doing this.
- Properties in Objective c. copy and retain
- presentModalViewController from app delegate
- Deleting/Removing Group in Xcode
- Load UITableView crash caused by message sent to deallocated instance
- Why can't I use “description” as an attribute name for a Core Data entity?
- How to determine whether class B is a subclass of class A?
- resignFirstResponder vs. endEditing for Keyboard Dismissal
- Should I merge .pbxproj files with git using merge=union?
- CardIO cant get my card Info
- RetainCount OK to use in this instance?
- UI Test Case not show code coverage
- iOS 8 – AutoLayout issue – UIImageView inside UITableViewCell ignoring width constraints
- How to run an iOS application every 1 minute infinitely?
- generic type conforming to a protocol in Swift
- Following a CGPath with SKAction without starting from beginning of CGPath