How to run an iOS app that causes runtime error for frameworks "code signature invalid"
Asked Answered
C

9

42

Every time I try to run this application it builds OK and installs, but as soon as it runs, the application breaks and prints this error message:

dyld: Library not loaded: @rpath/StandardCyborgFusion.framework/StandardCyborgFusion
  Referenced from: /private/var/containers/Bundle/Application/2292CCF2-800F-4E28-AF10-A1B98081DD0A/StandardCyborgExample.app/StandardCyborgExample
  Reason: no suitable image found.  Did find:
    /private/var/containers/Bundle/Application/2292CCF2-800F-4E28-AF10-A1B98081DD0A/StandardCyborgExample.app/Frameworks/StandardCyborgFusion.framework/StandardCyborgFusion: code signature invalid for '/private/var/containers/Bundle/Application/2292CCF2-800F-4E28-AF10-A1B98081DD0A/StandardCyborgExample.app/Frameworks/StandardCyborgFusion.framework/StandardCyborgFusion'

I saw many similar posts here and on the App Developer forums about this problem but no one has an explanation or a valid fix.

I tried:

  • Cleaning and building
  • Restarting XCode
  • Restarting the Mac
  • Completely resetting Keychain
  • Verifying all Keychain certs Trust settings are on "Use System Defaults"
  • Factory resetting my Mac

It appears to be an issue with my iOS device. The application can start on a simulator, but the simulator is not good for my development purposes so I need to make this work on my device. I recently updated my iPhone XR to iOS 13.3.1.


"Running new app on actual iOS (13.3.1) device crashes on startup: code signature invalid for "path/to/Flutter.framework/Flutter" #49504" seems to be the same issue.

I'm using XCode 11 and iOS 13.

Cerussite answered 1/2, 2020 at 8:41 Comment(8)
where is StandardCyborgFusion.framework from? contact its developer ...Anaplastic
did you try linking or embedding the framework?Calm
This error happens with all apps. Is not framework specific.Cerussite
Added an update. It appears to be device specific since it works on simulator, and a friend of mine is able to compile the same frameworks on his device.Cerussite
Your StandardCyborgFusion.framework is either not code signed, or not compiled for arm64 architecture. You still haven't told us how you got the framework. Also, if anyone tells you to restart Xcode to fix compilation/linking issues, downvote them.Winterfeed
I got the framework here standardcyborg.com/docs/ios-quickstart. I want to restate that this happens with multiple frameworks. It also happens with FBLPromises and Flutter frameworks. I also have a friend who is able to run the same quick start on their device (iPhone XR, just like mine) which has NOT been updated to the most recent version of iOS. The fact that they can run the same code on their device makes it seem like there isn't any problem with the framework, although I am not sure how code signing works.Cerussite
Could it be a problem with CocoaPods? I have the same problem when calling SQLite, that I installed via cocoaPods. After removing all use of SQLite calls from my code, I don't have the error anymore. (SQLite was the only package I installed via cocoaPods)Mauretta
Since I can't comment, I'll post it as an answer. It was mentioned multiple times, that you can install iOS 13.4 beta to fix the problem but for me there was no way to download the beta profile on the developer downloads page (I don't have a paid account... (?)). Commenting out "use_frameworks!" wouldn't work for me because I use React-Native and there's no "use_frameworks!" in my Podfile. So for those of you having the same issue, here's a blog post I found where they've uploaded the beta profile for download + tutorial on how to install the iOS beta with that profile. [igeeksblogContradict
H
32

I'm using CocoaPods, and for me this fixes the error (Wasa22's Answer on github issue):

  1. Open the podfile
  2. Comment out use_frameworks!
  3. Add use_modular_headers!
  4. In Terminal, do a pod update -> pod install
  5. In Xcode, Clean (Command-Shift-K) -> Build and Run.

Source: https://github.com/Alamofire/Alamofire/issues/3051

Hyperbolism answered 11/2, 2020 at 22:26 Comment(3)
Haven't had time to verify if this works since I just borrowed a friends developer account but I will mark this as correct. I would appreciate if others could confirm that this works for them too.Cerussite
What if I don't have the podfile , what can I do in this case?Doggo
comment out use_frameworks and run pod update command is enoughWoollen
C
37

This is an issue with iOS 13.3.1. All dynamic frameworks being compiled to the newest release of iOS 13.3.1 are experiencing this issue when run on a personal provisioning profile/developer account. The solution, copied from jmagman from Github, is below.

You can:

  1. Use a non-Personal Team provisioning profile (paid developer account).
  2. Run on the 13.3.1 simulator.
  3. Test on a real iOS device running 13.3 or lower.
  4. Install the beta profile on your test device and install iOS 13.4 beta 3. (Fixed)
  5. Wait for iOS 13.4 to be released.

Hopefully this issue will be fixed soon.

Cerussite answered 6/2, 2020 at 8:31 Comment(6)
I am downgrading from iOS 13.3.1 to 13.3. Can't just stay and wait until Apple fixes this.Sisely
Huh...it seems that I cannot backup my data while having iOS 13.3.1 and then Restore it on iOS 13.3. That's sad (( The restore has to be performed under the same iOS versions. So, this is not a solution either...Sisely
I wish I would've found this answer sooner . . . I spent 3 hours trying to configure my build settings, binaries, and build phases. . . Getting a paid account solved it prestoGhibelline
Classic apple, creating a bug that pushes you to buy something.Jointed
Thank you very much for the clear and correct answer, +1.Macassar
I spent 3 hrs on this issue and finally this solution worked. Thanks a ton @AidanRosswood.Gelatinate
H
32

I'm using CocoaPods, and for me this fixes the error (Wasa22's Answer on github issue):

  1. Open the podfile
  2. Comment out use_frameworks!
  3. Add use_modular_headers!
  4. In Terminal, do a pod update -> pod install
  5. In Xcode, Clean (Command-Shift-K) -> Build and Run.

Source: https://github.com/Alamofire/Alamofire/issues/3051

Hyperbolism answered 11/2, 2020 at 22:26 Comment(3)
Haven't had time to verify if this works since I just borrowed a friends developer account but I will mark this as correct. I would appreciate if others could confirm that this works for them too.Cerussite
What if I don't have the podfile , what can I do in this case?Doggo
comment out use_frameworks and run pod update command is enoughWoollen
F
3

This appears to be fixed on iOS 13.4 beta 3. You can install the beta profile or wait for the release of iOS 13.4.

Floro answered 27/2, 2020 at 22:16 Comment(1)
On the 24th of March Apple released iOS 13.4. This update includes a fix for the code signature issue! Please refer to the iOS 13.4 beta 3 for more information.Rhinal
L
2

I see 2 way to fix it.

  1. Downgrade to iOS 13.3. iOS 13.3.1 breaks third parties signature unless you have a paid developer account. If possible (get a cheap iphone dedicated to development)

  2. Update Mac OS, Xcode, and iOS to latest Beta version (Update anyone of them alone will not work, because iOS beta requires latest Xcode beta, and Xcode requires latest Mac OS Catalina)

Lothar answered 13/3, 2020 at 21:33 Comment(0)
C
2

I had the same issue using a local framework. After hours of debugging, all I had to do what change the default "Do Not Embed" to "Embed & Sign" and the error went away. Worth a try! :)

Embed Image

Cypripedium answered 12/8, 2020 at 23:10 Comment(0)
A
0

If you run from Xcode you will see an error like:

/private/var/containers/Bundle/Application/D0BD5694-A7D6-4820-A146- 
 A49DF0C0F0B1/Runner.app/Frameworks/Flutter.framework/Flutter: code signature 
invalid for '/private/var/containers/Bundle/Application/D0BD5694-A7D6-4820- 
A146-A49DF0C0F0B1/Runner.app/Frameworks/Flutter.framework/Flutter'

solution provided by jmagman on Github

jmagman has escalated to Apple (FB7562472) and will let everyone know if they hear anything. more details on github

Anosmia answered 13/2, 2020 at 0:18 Comment(0)
R
0

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!

Rhett answered 8/4, 2020 at 16:59 Comment(1)
You just have to upgrade your iOS Device to 13.4.x. After upgrading I can run some example project without any other adjustments.Tracheo
S
0

I had the same error message with GoogleUtilities.framework. My problem occurred when trying to run on the simulator. On the device, it ran fine. The problem is that CylancePROTECT antivirus software on my MacBook is quarantining the file and this causes the app to crash. Check if your device is running CylancePROTECT or some other antivirus software that is blocking the framework you need.

enter image description here

Sweeping answered 11/6, 2020 at 2:43 Comment(0)
U
-1

This is an Apple's problem. I solved this issue by upgrade my device to iOS 13.4.1 Also, if you don't want upgrade ios system,and you also use Podfile, you can do flow ways:

  • Comment out use_frameworks! in Podfile.
  • Add use_modular_headers!
  • pod deintegrate + pod install.
  • Clean (Command-Shift-K) -> Build and Run.
Ultrasonic answered 8/5, 2020 at 3:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.