【问题标题】:RealmSwift (0.92.3) and provisioning profile errorRealmSwift (0.92.3) 和配置文件错误
【发布时间】:2015-05-15 23:32:04
【问题描述】:

当我尝试用我的 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) 

知道有什么办法吗???任何帮助表示赞赏!

【问题讨论】:

    标签: ios swift realm


    【解决方案1】:

    解决方案是在应用程序的目标中创建一个新的“运行脚本阶段”,如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 中查找以及它最终的样子的屏幕截图!

    【讨论】:

      【解决方案2】:

      Kruherson 建议您使用 CocoaPods。 Check this post...

      感谢Kruherson - 我们现在知道,在应用商店的应用程序修订期间似乎存在问题,当前解决方案来自官方领域.io Swift-documentation 页面!

      这里是 CocoaPods 安装说明

      Install CocoaPods 0.37.1 or later ([sudo] gem install cocoapods).
      In your Podfile, add use_frameworks! and pod 'RealmSwift' to your main and test targets.
      From the command line, run pod install.
      Use the .xcworkspace file generated by CocoaPods to work on your project!
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-10-10
        • 2015-05-11
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多