dyld: Library not loaded

So yesterday I installed iOS 13.3.1 on my iPhone XR and macOS 10.15.3 on my iMac.


Then, I've been getting this error in Xcode using any project that has CocoaPods Frameworks in it :

dyld: Library not loaded: [...] Reason: no suitable image found.

- It launches fine in the iPhone 11 simulator

- It launches fine on my gf's iPhone XR which still has iOS 13.3

- Tried different pods (SwiftSoup and GRDB.swift)

- Tried reinstalling CocoaPods

- Tried updating CocoaPods to latest stable and latest beta versions

- Tried different projects

- Tried cleaning the build folder

- Tried deleting/reinstalling apps

- Tried deleting the derived data

- Was already using the latest Xcode 11.3.1 since a few weeks


is there anything I did not do? Does it happen to anybody else?

  • Many of the answers here pertain to Cocoapods. If you're using Carthage and seeing this issue, ensure that you're setting any frameworks in your project to "Embed & Sign" in the Project Settings -> <Target name, in Targets section> -> Frameworks, Libraries, and Embedded Content section.

Add a Comment

Accepted Reply

Hi,

I solved this problem commenting use_frameworks! in my Podfile :

https://github.com/Alamofire/Alamofire/issues/3051#issuecomment-580003683


Hope it will works for you !

Valrani

Replies

I upgraded to Xcode 11.4.1 and the problem continues. 😟

Above fix did not work for me.

I am also facing the same issue when I create a Framework with CocoaPods as Dependency and add Alamofire, App i crashing that Alamofire not dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire
Xcode (11.4.1)
By default its creating Apps with iOS 13.4


Ironically when i use the Pod dependency of Alamofire in a iOS Application its working. Only If we want to create a Custom Framework with CoCoaPods as dependency with Alamofire its not working.


I tried below to fix but not working

1. remove use_frameworks!

Try to update xcode to newest version. For example xcode 11.4.1 and ios 12 works. The same xcode version and latest ios version on iphone doesnt install app.