44

My app crashes on lunch and getting this error:

dyld: Library not loaded: @rpath/FBLPromises.framework/FBLPromises
  Referenced from: /private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Zeta
  Reason: no suitable image found.  Did find:
    /private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises: code signature invalid for '/private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises'

    /private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises: stat() failed with errno=25
    /private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises: code signature invalid for '/private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises'

    /private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises: stat() failed with errno=1
    /private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises: code signature invalid for '/private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises'

    /private/var/containers/Bundle/Application/11X3EC15-5A16-4E27-AC4A-FB0503E6F1E2/Zeta.app/Frameworks/FBLPromises.framework/FBLPromises: stat() failed with errno=1
(lldb)

I used it on my own device (iPhone 11 pro) iOS 13.3.1. It was working perfectly fine before I update my device to iOS 13.3.1 . My app also works perfectly fine on the simulator (iPhone 11 - iOS 13.3). Using Xcode 11.3.1.

Removing the profile from my device and trusting again didn't work.

UPDATE: Tried to build it using Xcode Beta 11.4 and didn't work.

UPDATE II:

  • The only pods that I'm using are Firebase/Auth, Firebase/Core, Firebase/Firestore.
  • Commenting use_frameworks! and using use_modular_headers! gave me these errors: Showing Recent Issues The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 8.0 to 13.2.99. (For all the pods in the project)
arata
  • 859
  • 1
  • 8
  • 23
  • maybe try to do `pod update` and check if it helps. – Maciej Gad Feb 06 '20 at 13:46
  • @MaciejGad also tried that. didn't work – arata Feb 06 '20 at 13:46
  • 1
    I had the same issue, take at look at [this question on SO](https://stackoverflow.com/questions/60045282/after-updating-ios-all-applications-using-the-framework-stopped-running-on-the), it helped me. – theme_an Feb 07 '20 at 11:53
  • 1
    Does this answer your question? [After updating iOS, all applications using the framework stopped running on the device, but they run on the simulator](https://stackoverflow.com/questions/60045282/after-updating-ios-all-applications-using-the-framework-stopped-running-on-the) – NateMS Mar 05 '20 at 12:18
  • I tried Xcode 11.4 release and it didn't work – Roberto Apr 07 '20 at 04:14
  • @Roberto upgrade to iOS 13.4 or try a developer account with an active subscription. – arata Apr 07 '20 at 15:53
  • I was getting the same dyld error for GoogleUtilities.framework when running in Simulator. It was caused by CylancePROTECT antivirus software running on my MacBook which blocked execution of the framework. Curiously, I had no problems running on my device. – Mike Taverne Jun 11 '20 at 17:22
  • xcode: 11.3.1 ios:13.3. Am getting the same error. My developer account is actively subscribed. Worked the first build, i copied the folder and changed the bundle identifier. Then started this issue. – b.john Nov 01 '20 at 20:47

12 Answers12

35

You are probably using free developer account. Apple blocked utilizing external frameworks on free accounts with 13.3.1 upgrade. Try downgrading to 13.3 if still possible or buy Apple Developer License.

UPDATE 04/2020: Upgrading to iOS 13.4 and XCode 11.4 currently solves this issue.

Saico
  • 544
  • 5
  • 12
  • 9
    I've also tried with an account which is in apple developer program but still getting same thing. – arata Feb 11 '20 at 14:16
  • 1
    @arata check that you've selected correct Team identifier for code signing. – Kirow Feb 13 '20 at 15:50
  • 10
    "Apple blocked utilizing external frameworks on free accounts" But.. WHY?!? – Zimes Feb 18 '20 at 07:33
  • 2
    Though this seems to be the case, there's no hard evidence to corroborate it. It may also be a bug in this iOS version. Is there an official announcement on behalf of Apple regarding this (link)? – Perikles C. Stephanidis Feb 18 '20 at 18:41
  • Not working for me, iOS 13.4beta4 / iPhone XR – Dikey Mar 09 '20 at 08:34
  • 2
    My account is an enterprise account paid for by my company, and I'm getting this same kind of error. – Mike Taverne Apr 30 '20 at 23:38
  • I have tried to downgrade to iOS 13.0 and with a paid apple dev account and still same error. – Max Jun 05 '20 at 11:19
  • Unbelievable this as accepted answer. I have try to use my company enterprise acc, still face the same issue. – Tommy Leong Jul 31 '20 at 15:22
  • xcode: 11.3.1 ios:13.3. Am getting the same error. My developer account is actively subscribed. Worked the first build, i copied the folder and changed the bundle identifier. Then started this issue. Any solutons @TommyLeong – b.john Nov 01 '20 at 20:58
9

I had the same problem after updating my iPhone to iOS 13.3.1. The fix that has worked for me: In the Podfile remove use_frameworks! and add ,:modular_headers => true after each pod. Close xcode, update pods and rebuild.

My full Podfile looks like this:

target 'HeatingClient' do
  # use_frameworks!

  pod 'RxSwift',:modular_headers => true
  pod 'RxCocoa',:modular_headers => true

end
8

This issue is specific to iOS 13.3.1 devices with free dev account, i was struggling with it for 4 days and got the solution.

  1. Uninstall Pods from your project folder, use terminal:

    sudo gem install cocoapods-deintegrate cocoapods-clean pod deintegrate pod clean rm Podfile

  2. Initialize pods again in project, terminal: pod init

  3. In Podfile change this line:

    target 'exampleproject' do
      # Comment the next line if you don't want to use dynamic frameworks
        use_frameworks!
    

    to this lines:

    target 'exampleproject' do
      # Comment the next line if you don't want to use dynamic frameworks
      # use_frameworks!
      use_modular_headers!
    
  4. Install Pods again in terminal: pod install

  5. Open project by file .xcworkspace and do Product > Clean Build Folder (Command+Shift+K)

  6. Run and build with free developer account on your iOS 13.3.1 device.

MarcoPolokk
  • 111
  • 1
  • 6
  • using `use_modular_headers!` gave me these errors `Showing Recent Issues The iOS deployment target IPHONEOS_DEPLOYMENT_TARGET is set to 4.3, but the range of supported deployment target versions is 8.0 to 13.2.99` for all the pods and also why bother when you can make a clean project again for more accurate results? – arata Feb 25 '20 at 12:43
  • 1
    I think you have to change iOS Deployment Target to iOS > 8.0 in Project Setting in Info Tab – MarcoPolokk Feb 25 '20 at 12:52
  • thank you, only your steps helped me. Before it saw the framework but didn't see the classes – Paul T. May 14 '20 at 13:59
  • this doesnt work if you have the firebase pod installed, something about swift requiring frameworks to get boringssl working (my error was: module map file '/Users/me/Desktop/myApp/Pods/Headers/Private/openssl_grpc/BoringSSL-GRPC-library.modulemap' not found) – Benjamin B. Aug 18 '20 at 19:29
  • This worked for me, save my life! – empt Nov 29 '22 at 03:55
6

As was mentioned above:

Apple blocked utilizing external frameworks on free accounts with 13.3.1 upgrade.

So use developer account with active subscription or use static libraries.

Solution for Cocoapods - use use_modular_headers!

Kirow
  • 1,077
  • 12
  • 25
  • I'm using a developer account now but also getting the same problem and even when I use `use_modular_headers` I'm getting `Showing Recent Issues The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 4.3, but the range of supported deployment target versions is 8.0 to 13.2.99.` for all the pods and I only added the Firebase pods (Firestore, Core, Auth). I've re-made my app with both Xcode 11.3.1 and 11.4 Beta. – arata Feb 14 '20 at 01:28
  • @arata well, error message says that you've set ios 4.3 somewhere. Minimal is 8.0. If it is related to pods add `platform :ios, '8.0'` to Podfile or [post script](https://stackoverflow.com/a/58367269/1135154). otherwise look to your targets. Also if you use dev account you can still use `use_frameworks!` instead of `use_modular_headers!` – Kirow Feb 14 '20 at 11:55
  • 1
    use_modular_headers! works for me!!! – IvanPavliuk Feb 25 '20 at 19:59
  • It looks like they are preparing to push for Swift Package Manager (it will support resources from Swift 6) and kill CocoaPods. – KlimczakM Mar 05 '20 at 09:14
4

I was using apple free account, switched to apple paid account and it worked in iOS 13.3.1

Mudassir Asghar
  • 218
  • 2
  • 11
2

Are you using a non-developer Apple ID to install the app on 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.

3ameration
  • 101
  • 2
  • 3
2

the issue is with iOS 13.3.1 and free developer accounts . the issue is fixed on latest iOS 13.4 beta I confirm it. for now you can use

use_modular_headers!

instead of

use_frameworks!

in project Podfile

Paul T.
  • 4,938
  • 7
  • 45
  • 93
mahad shahib
  • 300
  • 2
  • 12
1

Looks like whe only way to avoid error on free account is use ios 13.3, because even in iOS 13.4 beta apple didn't fix it. Using use_modular_headers! is not working for Firebase.

Vlad Bruno
  • 327
  • 3
  • 7
  • Firebase is treating this as an iOS issue and does not plan to release a fix. Let's hope iOS 13.3.2 fixes the issue. No news from Apple so far. – Vedant Feb 27 '20 at 09:41
  • It helped for me https://take.ms/JMf9h and podfile , but I had to follow MarcoPolokk's steps – Paul T. May 14 '20 at 14:01
0

Probably the problem on the Xcode or the framework itself, I was got the same error on Xcode 11.4 beta and iOS 13.4 beta 1. Use the Xcode 11.3.1 for running on real devices until the next beta of Xcode will be released.

Makwan Barzan
  • 353
  • 1
  • 6
  • 12
0

Open the file extension and make sure it's in the library.

Open Xcode -> Products -> YourApp.app -> "Show in Finder"

And you see

"YourApp.app" -> This file "right click" and click -> "Show package contents"

If libraries are missing here, you need to check their framework connections.

ikbal
  • 1,110
  • 12
  • 21
0

I tried commenting out the line # use_frameworks! in the pod file and it worked

Lina
  • 28
  • 5
0

I faced same problem. power of use_modular_headers! to avoid the crash and below code working for me.

# Uncomment the next line to define a global platform for your project
#platform :ios, '10.0'

target 'YourApp' do

   use_modular_headers!
  # Pods for YourApp

   pod 'Kingfisher', '~> 5.0'
   pod 'GoogleMaps'
   pod 'GooglePlaces'
   pod 'Firebase/Analytics'

end
Nazmul Hasan
  • 10,130
  • 7
  • 50
  • 73