Swift 4.0 模块在带有 Xcode 9.0 的 Swift 3.2 应用程序中运行良好。
但是现在,使用 Xcode 9.1,我得到:
Module compiled with Swift 4.0 cannot be imported in Swift 3.2.1
或者:
Module compiled with Swift 4.0 cannot be imported in Swift 4.0.1
最佳答案
通过安装 Xcode 9.0 toolchain 可以在 Xcode 9.1 beta 2 中使用 Swift 3.2 进行构建。并使用它来构建您的项目。
然后在 Xcode -> Toolchains 菜单下选择 Swift 4.0 版本。
您现在应该能够在 Xcode 9.1 b2 中使用 Swift 3.2 或 4.0 进行构建。
关于swift4 - 使用 Swift 4.0 编译的模块无法在 Swift 3.2.1 中导入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46659988/