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

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容