我正在尝试构建和运行一个使用 AVFoundation 框架的应用程序......
(我知道这是重复的,但其他地方发布的解决方案对我没有帮助。)
我构建成功,但是当我从 Xcode 重新运行它时应用程序崩溃并出现以下错误:
> dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib
Referenced from : /private/var/containers/Bundle/Application/B9B93BB2-F55E-4DAE-A720-0F2D22A47278/FaceMarks.app/FaceMarks
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/B9B93BB2-F55E-4DAE-A720-0F2D22A47278/FaceMarks.app/Frameworks/libswiftAVfoundation.dylib:
>code signature invalid for '/private/var/containers/Bundle/Application/B9B93BB2-F55E-4DAE-A720-0F2D22A47278/FaceMarks.app/Frameworks/libswiftAVfoundation.dylib'
> lldb
完整的错误信息:我找到了很多解决方案,我已经测试了很多,但所有这些都不适合我:
- Clean, build and run an application
- Set "Always Embed Swift Standard Libraries" to "Yes" under the Build Settings > Build Options
- Restart Xcode
- Restart the phone
- Reinstall the Xcode
- Testing other simple application on my iPhone ( App contains just a print function )
Note: That the test app works fine on the simulator but on my iPhone it gives the same error
迪尔德:库未加载:@rpath/libswiftCore.dylib
最佳答案
代码签名问题通常与帐户相关,因此如果您使用的是带有某些限制和过期问题的免费 Apple 开发帐户。
首先,确保您有一个有效且活跃的开发人员帐户登录到 Xcode 下:
Xcode | Preferences | Accounts
或者删除那里显示的开发者帐户,然后重新添加。
其次,确保在 Preferences | 下指定的帐户帐户与您在以下项目中选择的项目目标相匹配:
<TargetName> | Signing & Capabilities
关于ios - dyld : Library not loaded: code signature invalid,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60384835/