我有一个使用Capacitor的Ionic 4项目。我试图打开并构建iOS版本。Xcode成功构建并安装了应用程序。但是当应用程序运行时,它会在启动画面上冻结,并在Xcode日志中出现以下错误:
dyld: Library not loaded: @rpath/Capacitor.framework/Capacitor
Referenced from: /var/containers/Bundle/Application/F39FC29D-255C-4BED-B6D5-6FEF4979C5F5/App.app/App
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/F39FC29D-255C-4BED-B6D5-6FEF4979C5F5/App.app/Frameworks/Capacitor.framework/Capacitor: code signature in (/private/var/containers/Bundle/Application/F39FC29D-255C-4BED-B6D5-6FEF4979C5F5/App.app/Frameworks/Capacitor.framework/Capacitor) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
/private/var/containers/Bundle/Application/F39FC29D-255C-4BED-B6D5-6FEF4979C5F5/App.app/Frameworks/Capacitor.framework/Capacitor: code signature in (/private/var/containers/Bundle/Application/F39FC29D-255C-4BED-B6D5-6FEF4979C5F5/App.app/Frameworks/Capacitor.framework/Capacitor) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
/private/var/containers/Bundle/Application/F39FC29D-255C-4BED-B6D5-6FEF4979C5F5/App.app/Frameworks/Capacitor.framework/Capacitor: stat() failed with errno=1
/private/var/containers/Bundle/Application/F39FC29D-255C-4BED-B6D5-6FEF4979C5F5/App.app/Frameworks/Capacitor.framework/Capacitor: code signature in (/private/var/containers/Bundle/Application/F39FC29D-255C-4BED-B6D5-6FEF4979C5F5/App.app/Frameworks/Capacitor.framework/Capacitor) not valid for use in process using Library Validation: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)
/private/var/containers/Bundle/Application/F39FC29D-255C-4BED-B6D5-6FEF4979C5F5/App.app/Frameworks/Capacitor.framework/Capacitor: stat() failed with errno=1
我已经在能力部分勾选了自动签名,以允许Xcode执行所有必要的签名操作。
但是所有的解决方案对我都不起作用,我总是收到这个消息。
我的Xcode版本是10.2.1。我必须提及的是,该应用程序在Xcode iOS模拟器上可以正确运行。
请帮助我,我已经为这个错误奋斗了两天!
谢谢