SolvedAlamofire iOS 13.3.1 dyld: Library not loaded
✔️Accepted Answer
Are you using a non-developer Apple ID to install the app to your phone? It looks like iOS 13.3.1 has broken apps installed with free Apple IDs, but only if they contain embedded frameworks. If it's possible to link all your dependencies as static libraries rather than frameworks (for example, if you're using Cocoapods you can remove use_frameworks!
from your Podfile), that should fix the issue for now.
Other Answers:
Yes, I rebuilt it with Xcode 11.3.1 but keeps crashing. I also tried a clean install but nothing, throws the same error.
Looks like Apple made something in the last iOS version, everything works fine on 13.3, it only happens on 13.3.1.
Maybe it's something with the dynamic frameworks; a workaround I found in CocoaPods is comment the use_frameworks! line in the Podfile, do a pod update, pod install, clean and run. And now I can run my app again on my 13.3.1 devices.
@rfcj I forgot to mention that I added use_modular_headers!. In my case, I'm using Realm and that pod keep throwing me error until I added the line I said.
Try that, maybe it will help with your pods.
I had same issue with Alamofire, and solved it by removing use_frameworks! from pod file and adding use_modular_headers! then in console pod deintegrate, pod update and pod install
Now everything works fine.
@rileytestut removing use_frameworks!
and using use_modular_headers!
didn't work for my various Firebase pods. But does this mean swapping to a paid developer ID will resolve this error?
I'm getting this error when trying to run my app with Alamofire 5.0.0-rc3:
dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire
Referenced from: /private/var/containers/Bundle/Application/CC8FF01F-CB03-4D92-ADDE-8B458EDF3D74/SupremeYou.app/SupremeYou
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/CC8FF01F-CB03-4D92-ADDE-8B458EDF3D74/SupremeYou.app/Frameworks/Alamofire.framework/Alamofire: code signature invalid for '/private/var/containers/Bundle/Application/CC8FF01F-CB03-4D92-ADDE-8B458EDF3D74/SupremeYou.app/Frameworks/Alamofire.framework/Alamofire'
I've been tested my app on an iPhone 11 Pro 13.3 and it was working fine until I decided to update the phone. So I update the iPhone 11 to the 13.3.1 version, and the error started to appear.
it works fine on an iPhone 8 Plus with iOS version 13.3.
Also it doesn't work on an iPhone 6s with iOS 13.3.1.