2017-09-26 53 views
0

我試圖使用使用pod安裝的Realm來構建項目。儘管重建一切XCode 9:使用Swift 3.0.2編譯的模塊無法在Swift 3.2中導入

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 

儘管一切都被設定爲3.2雨燕,儘管清洗了一切,儘管刪除導出的數據:我已經這樣做了。我仍然得到這個錯誤:

"Module compiled with Swift 3.0.2 cannot be imported in Swift 3.2".

這是說RealmSwift庫。

爲什麼當RealmSwift目標設置爲3.2並且已經重建時,爲什麼爲什麼它仍然會說它的3.0.2?

回答

0

試試這個:

  1. 從您的POD文件中刪除RealmSwift
  2. 運行莢更新
  3. 重新添加RealmSwift到您的吊艙文件
  4. 運行莢更新
  5. 清理項目
  6. 建立並運行
+0

雖然「以下二進制文件使用Swift:RealmSwift和我的應用程序的不兼容版本」,但我現在明白了這一點,但兩者中的所有內容都設置爲3.2。 – Gruntcakes

+0

現在執行以下操作:1:清理項目。 2:關閉項目並退出Xcode。 3:清理派生數據。 4:再次打開項目並重新運行 –

+0

仍然是一樣的東西 – Gruntcakes

相關問題