问题
Every time I try to run this app it builds OK, and installs but as soon as it runs the app breaks and prints this error message. XCode 11 and iOS 13.
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've seen many similar posts on here and on App Developer forums about this problem but not one has an explanation or a valid fix. I've tried
- Cleaning and building
- Restarting XCode
- Restarting Mac
- Completely resetting Keychain
- Verifying all Keychain certs Trust settings are on "Use System Defaults"
- Factory resetting my Mac
UPDATE 1: It appears to be an issue with my iOS device. The app can start up 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.
UPDATE 2: Found another group seeming to have the same issue https://github.com/flutter/flutter/issues/49504.
回答1:
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:
- Use a non-Personal Team provisioning profile (paid developer account).
- Run on the 13.3.1 simulator.
- Test on a real iOS device running 13.3 or lower.
Hopefully this issue will be fixed soon.
来源:https://stackoverflow.com/questions/60015309/running-ios-apps-causes-runtime-error-for-frameworks-code-signature-invalid