Module compiled with swift 3.0 cannot be imported in Swift 3.0.1

后端 未结 9 1507
执念已碎
执念已碎 2020-11-30 21:59

I upgraded Xcode to 8.1 GM and am now getting the below error for SwiftyJSON. Other imported frameworks seem to work. Is there a way to force this to work in Swift 3 until S

相关标签:
9条回答
  • 2020-11-30 22:43

    I had exactly the same issue with the library XCTest_Gherkin, what it worked for me was:

    1. Product -> Scheme -> XCTest-Gherkin
    2. Product -> Build

    Hope it helps. I am using Cocoapods.

    0 讨论(0)
  • 2020-11-30 22:48

    Make sure you've placed the new XCode 8.1 GM package in your Applications folder. We ran into this issue when one of us was running Carthage to update our dependencies, but had not replaced the XCode old 8.0 application in the applications folder (8.1 GM was running off the Desktop).

    You want to make sure that when you run the following in terminal: xcrun swift -version that it returns Apple Swift version 3.0.1.

    0 讨论(0)
  • 2020-11-30 23:01
    1. Move the beta/GM version if the Xcode to /Applications folder and name it Xcode-beta

    2. Check the output of:

      xcrun swift --version

    by running this command in terminal, its output should match with the swift version you want the app to compile, because Carthage uses output of this command, to determine the local Swift version.

    1. Update Xcode version to latest on Terminal by running following command:

      sudo xcode-select -s /Applications/Xcode-beta.app/

    2. Build the libraries for iOS and prevents Carthage from downloading existing (yet incompatible) precompiled binaries, by running following command:

      carthage update --platform iOS --no-use-binaries

    3. Clean & Build

    0 讨论(0)
提交回复
热议问题