Module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2 compiler

[Module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2 compiler]

升级xcode到12.2的时候,编译不通过.提示上述错误

问题产生的原因就是Swift编译的Framework的swift版本和使用者APP使用的Swift版本不一致就会报这个错误

解决办法:

选择 framework target -> Build Settings -> Build Libraries for Distribution (BUILD_LIBRARY_FOR_DISTRIBUTION) -> Yes

你可能感兴趣的:(Module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2 compiler)