当我尝试用我的 iPhone 设备运行我的 watchkit 应用程序时出现以下错误消息(即模拟器运行良好):
dyld: Library not loaded: @rpath/RealmSwift.framework/Frameworks/Realm.framework/Realm
Referenced from: /private/var/mobile/Containers/Bundle/Application/9CCC-B93-89-4E6/MyApp.app/MyApp
Reason: no suitable image found. Did find:
/private/var/mobile/Containers/Bundle/Application/9CC8D-43AE7-F8E/MyApp.app/Frameworks/RealmSwift.framework/Frameworks/Realm.framework/Realm:
code signature invalid for '/private/var/mobile/Containers/Bundle/Application/9C98D-435D-A8E6/MyApp.app/Frameworks/RealmSwift.framework/Frameworks/Realm.framework/Realm'
(lldb)
知道要做什么吗???任何帮助表示赞赏!
最佳答案
解决方案是在应用的目标中创建一个新的“运行脚本阶段”,如 realm.io 中所述。页:
"If using Realm in an iOS project, create a new “Run Script Phase” in your
app’s target’s “Build Phases” and paste the following snippet in the script
text field:
bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmSwift.framework/strip-frameworks.sh"
This step is required to work around an App Store submission bug when
archiving universal binaries."
这是一张关于如何在 Xcode-menu 中查找以及它最终的样子的截图!
关于ios - RealmSwift (0.92.3) 和配置文件错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30270195/