简体   繁体   中英

Module compiled with Swift 5.2.4 cannot be imported by the Swift 5.3.1 compiler

Module compiled with Swift 5.2.4 cannot be imported by the Swift 5.3.1 compiler:
/Users/imac/Desktop/PixelPhoto/PixelPhotoSDK.framework/Modules/PixelPhotoSDK.swiftmodule/x86_64.swiftmodule

I have try many way to solve this but I can't resolve this issue. I am trying with toolchain and convert code to latest version also.

This is a framework issue. Apparently PixelPhotoSDK.framework has been built using either Xcode version 11.5 , 11.6 or 11.7 and more importantly without the BUILD_LIBRARY_FOR_DISTRIBUTION build configuration set to YES .

Unfortunately, there is not much you can do about it, if you are not the creator of this framework, other than go back to previous Xcode versions.

The creator of the framework can do one of 2 things: (or even better both)

  • Rebuild the framework using those old Xcode versions but with BUILD_LIBRARY_FOR_DISTRIBUTION configuration set to YES . (that will enable the ability to be used from an app that is build with different Swift compiler version. See Module Stability feature available since Swift 5.1)

  • Rebuild the framework using the Xcode version that you are currently using (probably version 12.2)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM