Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 13.3.1 dyld: Library not loaded #3051

Open
Wasa22 opened this issue Jan 29, 2020 · 20 comments
Open

iOS 13.3.1 dyld: Library not loaded #3051

Wasa22 opened this issue Jan 29, 2020 · 20 comments
Assignees
Labels

Comments

@Wasa22
Copy link

@Wasa22 Wasa22 commented Jan 29, 2020

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'

/private/var/containers/Bundle/Application/CC8FF01F-CB03-4D92-ADDE-8B458EDF3D74/SupremeYou.app/Frameworks/Alamofire.framework/Alamofire: stat() failed with errno=25
/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.

@Wasa22 Wasa22 changed the title iOS 13.3.1 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' /private/var/containers/Bundle/Application/CC8FF01F-CB03-4D92-ADDE-8B458EDF3D74/SupremeYou.app/Frameworks/Alamofire.framework/Alamofire: stat() failed with errno=25 /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' iOS 13.3.1 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. Jan 29, 2020
@jshier

This comment has been minimized.

Copy link
Contributor

@jshier jshier commented Jan 29, 2020

Have you rebuilt using Xcode 11.3.1 and distributed a new build to the device?

It's unlikely there's anything Alamofire can do here, but I'll keep this issue open until we see some sort of conclusion as to cause.

@jshier jshier self-assigned this Jan 29, 2020
@jshier jshier added the support label Jan 29, 2020
@jshier jshier changed the title iOS 13.3.1 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. iOS 13.3.1 dyld: Library not loaded Jan 29, 2020
@Wasa22

This comment has been minimized.

Copy link
Author

@Wasa22 Wasa22 commented Jan 29, 2020

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

This comment has been minimized.

Copy link

@rfcj rfcj commented Jan 30, 2020

I also have the same error, but when I comment use fameworks! i have problems with other pods

@Wasa22

This comment has been minimized.

Copy link
Author

@Wasa22 Wasa22 commented Jan 30, 2020

@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.

@rileytestut

This comment has been minimized.

Copy link

@rileytestut rileytestut commented Jan 30, 2020

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.

@rfcj

This comment has been minimized.

Copy link

@rfcj rfcj commented Jan 30, 2020

rileyestut, Yes, for now I am using a non-developer Apple-ID. And if I remove the use_frameworks! then I have problems with FirebaseAuth. And yes the problem occurs in others frameworks as i see now.

@rfcj

This comment has been minimized.

Copy link

@rfcj rfcj commented Jan 30, 2020

Wasa22, thanks, work with use_modular_headers!.

@honga

This comment has been minimized.

Copy link

@honga honga commented Jan 30, 2020

@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?

@vicajilau

This comment has been minimized.

Copy link

@vicajilau vicajilau commented Jan 30, 2020

I have the same problem

@ronalson

This comment has been minimized.

Copy link

@ronalson ronalson commented Jan 30, 2020

@rileytestut Can you point me to any resource stating this fact? I'm fighting with this issue for almost 3 days already (on a Nativescript project) and your explanation is the only one that actually make sense (sadly, but it does).

@rileytestut

This comment has been minimized.

Copy link

@rileytestut rileytestut commented Jan 30, 2020

@ronalson Unfortunately all this is just coming from my own investigations; I can't find any official documentation on the matter. I've been trying to discover the root cause of this since it's directly impacting my own project as well, but still not sure if this is an intentional decision or just a bug.

FWIW, this same issue was present with the first few betas of iOS 13.2 as well, but was "fixed" by the GM so I assumed it was just a bug back then. However, now that it was also in the iOS 13.3.1 betas as well as GM, I'm not so sure 😐

@rileytestut

This comment has been minimized.

Copy link

@rileytestut rileytestut commented Jan 30, 2020

@honga Yes, using a paid developer Apple ID should fix the issue AFAIK

@Wasa22

This comment has been minimized.

Copy link
Author

@Wasa22 Wasa22 commented Jan 30, 2020

Yeah it looks like the problem is the free Apple ID provisional profile.

Another people are mentioning this behavior like here:
ionic-team/capacitor#2383

And they said that the issue is solved with a paid developer Apple ID.

@zackshap

This comment has been minimized.

Copy link

@zackshap zackshap commented Jan 31, 2020

removing use_frameworks! worked for me. I didn't need use_modular_headers!

@marcocanestrari

This comment has been minimized.

Copy link

@marcocanestrari marcocanestrari commented Jan 31, 2020

Same problem with Realm, removing use_frameworks! and adding use_modular_headers! worked

@sebastianhoratiu

This comment has been minimized.

Copy link

@sebastianhoratiu sebastianhoratiu commented Feb 2, 2020

What fixed this issue in my case was to delete the Apple Development profile from my device and then let Xcode install it again when I ran the app on the device.

General > Device Management > Apple Development ... > tap on it then tap on Delete App. Then when you run again the app one your device the profile will be installed again and you'll be asked to Trust it again.

Backdoorek added a commit to Backdoorek/Szkolny-iOS that referenced this issue Feb 2, 2020
For more info reference to Alamofire/Alamofire#3051
@Backdoorek

This comment has been minimized.

Copy link

@Backdoorek Backdoorek commented Feb 2, 2020

In my case it also required to reinstall provisioning profiles on my device

@orakay

This comment has been minimized.

Copy link

@orakay orakay commented Feb 3, 2020

rileyestut, Yes, for now I am using a non-developer Apple-ID. And if I remove the use_frameworks! then I have problems with FirebaseAuth. And yes the problem occurs in others frameworks as i see now.

I am using SQLite.swift framework with free developer account and experiencing the same trouble using iOS 13.3.1. Apple seems to be preventing unpaid accounts use frameworks in their applications in iOS 13.3.1.

None of the workarounds worked for me by the way...

@jlsaldana

This comment has been minimized.

Copy link

@jlsaldana jlsaldana commented Feb 4, 2020

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.

Thank you so much Riley! I was about to smash my keyboard in frustration haha.

@oem66

This comment has been minimized.

Copy link

@oem66 oem66 commented Feb 5, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.