Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dyld: Library not loaded: @rpath/Alamofire.framework/Versions/A/Alamofire Reason: image not found

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.

enter image description here

Now, I've removed my Developer ID, but the issue is still there. Does anybody have an idea?

like image 303
Ivan Avatar asked Apr 07 '15 06:04

Ivan


2 Answers

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
like image 115
Ivan Avatar answered Sep 23 '22 12:09

Ivan


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!

like image 26
NSurajit Avatar answered Sep 21 '22 12:09

NSurajit