Module compiled with Swift 4.0 cannot be imported in Swift 3.2.1

前端 未结 3 1289
感情败类
感情败类 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:23

    Swift 4.0 is compatible with Swift 3.2 only.
    Swift 4.0.1 is compatible with Swift 3.2.1 only.

    So:

    • you can't mix 4.0 and 3.2.1
    • you can't mix 4.0.1 and 3.2
    • you can't mix 4.0 and 4.0.1
    • you can't mix 3.2.1 and 3.2

    To formulate it differently:

    • you can mix Xcode 9.0 supported Swift versions together
    • you can mix Xcode 9.1 supported Swift versions together
    • you can't mix Xcode 9.0 and Xcode 9.1 Swift versions

    If the module was built by you, simply rebuild it with the same Xcode.
    If the module was built by a third party, request an Xcode 9.1 compatible build.

提交回复
热议问题