Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
268 views
in Technique[技术] by (71.8m points)

swift - How to run an iOS app that causes runtime error for frameworks "code signature invalid"

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.

question from:https://stackoverflow.com/questions/60015309/how-to-run-an-ios-app-that-causes-runtime-error-for-frameworks-code-signature-i

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...