问题描述
每次我尝试运行此应用程序时,它都能正常构建并安装,但一旦运行,应用程序就会中断并打印此错误消息:
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.
我试过了:
- 清洁和建造
- 重启 XCode
- 重新启动 Mac
- 完全重置钥匙串
- 验证所有钥匙串证书信任设置是否为使用系统默认值"
- 出厂重置我的 Mac
这似乎是我的 iOS 设备的问题.该应用程序可以在模拟器上启动,但模拟器不适合我的开发目的,所以我需要在我的设备上进行这项工作.我最近将我的 iPhone XR 更新到了 iOS 13.3.1.
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.
"在实际 iOS (13.3.1) 设备上运行新应用程序在启动时崩溃:代码签名无效对于 "path/to/Flutter.framework/Flutter" #49504" 似乎是同样的问题.
"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.
我使用的是 XCode 11 和 iOS 13.
I'm using XCode 11 and iOS 13.
推荐答案
我正在使用 CocoaPods,对我来说这修复了错误(Wasa22 在 github 问题上的回答):
I'm using CocoaPods, and for me this fixes the error (Wasa22's Answer on github issue):
- 打开 podfile
- 注释掉 use_frameworks!
- 添加 use_modular_headers!
- 在终端中,执行 pod update -> pod install
- 在 Xcode 中,清理 (Command-Shift-K) -> 构建并运行.
来源:https://github.com/Alamofire/Alamofire/issues/3051
这篇关于如何运行导致框架运行时错误“代码签名无效"的iOS应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!