XCode 9:使用Swift 3.0.2编译的模块无法在Swift 3.2中导入

时间:2017-09-26 18:34:13

标签: ios swift realm xcode9

我正在尝试使用使用pod安装的Realm构建项目。我做到了这一点:

   1) Updated to XCode 9
   2) Run "pod update".  Note the podfile has SWIFT_VERSION set to 3.2 
   3) Checked in XCode settings that Swift Language version is set to 3.2
        for all the projects and targets.
   4) Deleted derived data 
   5) Cleaned everything 
   6) Quit and re-launched XCode 
   7) Rebuilt everything, including explicitly rebuilding the Realm targets

尽管一切都被设置为Swift 3.2,尽管已经删除所有内容,尽管已经删除了所有内容,但尽管已经重建了所有内容。我仍然一直收到这个错误:

  

“使用Swift 3.0.2编译的模块无法在Swift 3.2中导入。”

这是对RealmSwift库的说法。

为什么,当RealmSwift目标设置为3.2并且已经重建时,为什么它仍然在说它的3.0.2?

1 个答案:

答案 0 :(得分:0)

试试这个:

  1. 从您的pod文件中删除RealmSwift
  2. 运行pod update
  3. RealmSwift重新添加到您的pod文件
  4. 运行pod update
  5. 清理项目
  6. 构建并运行