Module compiled with Swift 4.0 cannot be imported in Swift 3.2.1

前端 未结 3 1293
感情败类
感情败类 2021-01-12 00:38

Swift 4.0 modules were fine in Swift 3.2 apps with Xcode 9.0.

But now, with Xcode 9.1, I get:

Module compiled with Swift 4.0 cannot be importe

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-12 01:07

    It's possible to build using Swift 3.2 in Xcode 9.1 beta 2 by installing the Xcode 9.0 toolchain and using that to build your project.

    Swift Toolchain Image

    Then choose the Swift 4.0 release under the Xcode -> Toolchains menu.

    You should now be able to build with either Swift 3.2 or 4.0 in Xcode 9.1 b2.

提交回复
热议问题