Alamofire: dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire on my iPhone(iOS8) while debuging

dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire
  Referenced from: /private/var/mobile/Containers/Bundle/Application/XXX/Anachronos.app/Anachronos
  Reason: image not found

Xcode6 GM

I’ve read all the issues about this kind of problem, but couldn’t solve the problem.

Also, there is the same issue in iOS Example project:

dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire
  Referenced from: /private/var/mobile/Containers/Bundle/Application/CEA6C4C1-C211-460C-8ECF-4FD9C66F1016/iOS Example.app/iOS Example
  Reason: image not found

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Reactions: 11
  • Comments: 58 (2 by maintainers)

Commits related to this issue

Most upvoted comments

I had a similar issue Build Phases zrzut ekranu 2014-09-15 o 21 08 34 General zrzut ekranu 2014-09-15 o 21 09 23

Had the same issue and finally solved it. The app would run on the simulator but not my iPhone. It drove me crazy. After a few hours I went to the Keychain Access and realized that my certificate says (this certificate was signed by an unknown authority).

cert

Solved this by following the steps here.

I ran the app on my iPhone after that and it worked!

@derpoliuk @mushu8 Came across this thread trying to solve a similar problem when adding a 3rd party framework to a framework i’m building. I resolved it by heading to build phases and adding a ‘new copy files phase’. Set destination to ‘Frameworks’ and then drag the framework into the list

(Example shows SDWebImage framework, but has universally solved the same problem I was having with Realm and MockingJay) screen shot 2015-12-28 at 5 12 40 pm

Hope it helps

EDIT: Can’t recommend this anymore; Although it works well in development Apple actually rejects apps that have a framework with embedded frameworks… Not sure why)

Run into the same issue. It works on my device but then throw the error when i run it in the Simulator. screen shot 2016-05-19 at 8 25 22 pm

I have the same problem except that my Alamofire is embeded in a framework that is linked to my project… dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire Referenced from: /private/var/mobile/Containers/Bundle/Application/4D3EC3B3-70DF-44A1-878D-03D717C65CFD/Fabville Recette.app/Fabville Recette Reason: image not found

What worked for me was this comment: “Is there the Embed Frameworks build phase? If there isn’t, you should add a new “Copy Files Phase”, then select “Frameworks” for Destination, add frameworks to the list, and check “Code Sign On Copy” checkboxes.”

Fixed by cb7dde5.

I encountered this issue when trying to build to my actual iOS device (but it worked fine in the simulator). I spent at least 10 hours trying to fix this bug. Tried everything in all the forums, nothing worked. But this is what finally worked for me!

  • Upgrading from iOS 13.3.1 to iOS 13.4.1

I couldn’t have imagined this, but its true that iOS 13.3.1 breaks the third parties signature unless you have a paid developer account!

I Have new issue faced in Alamofire Framwork

error Description >>

dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire
  Referenced from: /Users/sunilyadav/Library/Developer/CoreSimulator/Devices/76022694-CD0A-44EC-BCF7-B2470C0CF484/data/Containers/Bundle/Application/BEC17A4E-E681-44A3-A83F-6AC58601A51C/Odin_App_Project_Swift.app/Odin_App_Project_Swift
  Reason: image not found

plz help solve this isuue

@OmarAlEisa , Special thanks to you, I did experienced this because I removed all certificates from my keychain!!! Thanks to you.

Hi guys- I noticed that loads of people are still getting this error. I have found a fix that has worked for me and is pretty easy. I think its down to permissions. I have logged the issue with Apple as they really need to fix this bug.

When I changed the permission of the world Wide Developer cert to Use System defaults then it worked. I have included the steps and screenshots in the link below

I would encourage you to log the ticket in apple bug report as mentioned here as Apple really should solve this massive error: link to SO fix steps

I fixed, solution is Project -> General Tab -> Linked Framworks and Libraries -> Choose AlamorefireImage.framework

@i3omar After a full day of trying different things this was the missing thing that got me going. THANKS!

@korovyev You’re right in that it shows that the frameworks dependancies can be seen from within the framework itself (I didn’t know it did that!) But I’m not sure that they can then be used in the host application. I just tried to import one of those frameworks into the host application and it didn’t recognise it. Only when I imported that framework into the host app itself did it work ok, so you shouldn’t run into any issues with versioning. Whether or not the client app should include dependancies themselves I think depends on how your designing the framework itself to be built. I want something that’s simple for people to start using straight away without worrying about managing dependancies. While there may be a small duplication of code if the host app also chooses to use the same framework, it’s a matter of < 500 kb (as well as being hypothetical) Alternatively you can just include the raw source files and see if that works 😄

Thanks all for the insights in solving this issue. Just one clarification. The “Embed Frameworks” option was not available on xCode 6.3 under Build Phases. It is actually a “Copy Files Phase” (clicking in the +) in the same Build Phases. I had to do it too for other framework I use (SwiftyJSON).