I'm using CocoaPods v0.36
with my Swift
project and the following pods: Alamofire
, CocoaLumberjack
, SwiftyJSON
.
Everything was fine till I used my Developer ID.
Compiler started to have problems to compile the project, after some fixes and updates for CocoaPods
my project compiles but at runtime I get the following error:
dyld: Library not loaded: @rpath/Alamofire.framework/Versions/A/Alamofire
Referenced from: /Users/Ivan/Library/Developer/Xcode/DerivedData/myApp-bsxfcnwqpaxnzbhencwzteasshzf/Build/Products/Debug/myApp.app/Contents/MacOS/myApp
Reason: image not found
I read different posts related to this:
- http://blog.cocoapods.org/CocoaPods-0.36/
- http://samdmarshall.com/blog/swift_and_objc.html
- https://github.com/Alamofire/Alamofire/issues/101
But none seems to solve the issue.
The only clue that I have is that the 3 frameworks are in red, so it seems that are not generated/linked.

Now, I've removed my Developer ID, but the issue is still there. Does anybody have an idea?
dyld library not loaded @rpath/framework
please make sure that the framework is showing under target->general->embeded binaries and linked framework and libraries section
if not then add by clicking + sign add just add the framework only
done!
Solved Below the steps I did:
- pod deintegrate, pod update, pod install
- Reimported the three swift library files (generated by cocoapods)
- Imported the three frameworks only in the Linked Frameworks and Libraries
- Full clean and a build
we were running into this issue here at work and one person's project would run while the other would get this strange error.
We did some comparison and realized that error is being generated when in the Xcode project's target, under Build Phases
its missing some of the run scripts that Cocoapods is supposed to generate.
Check your project to make sure that these 3 scripts are there
Check Pods Manifest.lock Embed Pods Frameworks Copy Pods Resources
If they aren't I've attached a screenshot of them so that you can add them manually
Try this:
Find your Target
--> Build Phases
--> Add New Copy Files Phase
-->Choose Destination Option
,Frameworks
--> Click add
AFNetworking.framework --> ✓.
Make sure you have set valid certificate and provisioning profile in XCode!
I solved that trouble just by uncheck the "copy only when installing" on copy frameworks in Build Phases
None of the other stuff worked for me. So what did solve it for me in the end was a change in the podfile. I changed the code for the target in which it happened to:
target 'UITests' do
inherit! :search_paths
end
After a pod install it finally worked.
来源:https://stackoverflow.com/questions/29485035/dyld-library-not-loaded-rpath-alamofire-framework-versions-a-alamofire-reason