我将 Xcode 升级到 8.1 GM,现在收到以下 SwiftyJSON 错误。其他导入的框架似乎有效。在 SwiftyJSON 升级他们的框架之前,有没有办法强制它在 Swift 3 中工作?我使用 Carthage 来导入/更新框架。我还尝试更改 Use Legacy Swift language version
On 和 Off 无济于事。
Module compiled with Swift 3.0 cannot be imported in Swift 3.0.1: Modules/SwiftyJSON.swiftmodule/arm64.swiftmodule
最佳答案
SwiftyJson 正在被 carthage 下载预编译。预编译下载是 Swift 版本 3.0。这使得编译器提示版本不正确。使用以下命令:
carthage update --platform iOS --no-use-binaries
SwiftyJson(以及 Carthage 中的所有其他框架)将使用本地版本的 Swift (3.0.1) 在本地编译,编译器不会再报错。
关于swift - swift 3.0 编译的模块无法在 Swift 3.0.1 中导入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40250381/