【问题标题】:Error compiling RealmSwift with Xcode 8.2.1 and Swift 3使用 Xcode 8.2.1 和 Swift 3 编译 RealmSwift 时出错
【发布时间】:2017-01-30 13:28:49
【问题描述】:

我使用 Cocoapods 安装了 RealmSwift。安装成功,但是编译时显示96错误as shown below

我已经尝试了在互联网上找到的所有解决方案。我已经解散了 pod 并再次安装,但我不断收到相同的错误。请帮忙!

【问题讨论】:

    标签: ios swift3 realm xcode8.2


    【解决方案1】:

    看起来 Xcode 正在尝试针对错误版本的 Swift 运行 Realm Swift。我建议您尝试以下几件事:

    • 确保运行 pod spec update 将您的 Realm 本地副本更新到最新版本。
    • 确保您已遵循 Realm CocoaPods 说明并将其添加到您的 podfile 的底部:

     post_install do |installer|
       installer.pods_project.targets.each do |target|
         target.build_configurations.each do |config|
           config.build_settings['SWIFT_VERSION'] = '3.0.2'
         end
       end
     end
    

    如果这仍然不能为您解决问题,请使用您的 podfile 副本更新您的问题,以便我们进行审核。 :)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-15
      • 1970-01-01
      相关资源
      最近更新 更多