alibaba / HandyJSON

A handy swift json-object serialization/deserialization library
Other
4.22k stars 615 forks source link

生成的xcframework无法使用 #465

Open Jerryshen170918 opened 2 years ago

Jerryshen170918 commented 2 years ago

编译步骤: 1、设置Build Libiraries for Distribution 为true 2、用xcode12环境下使用carthage命令去生成xcframwork,命令如下:carthage build --no-skip-current --use-xcframeworks 3、在xcode13引用handyjson,编译报错。信息如下: Failed to build module 'HandyJSON'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)', while this compiler is 'Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)'). Please select a toolchain which matches the SDK.

stevendinggang commented 2 years ago

 我收到啦!!!

isandboy commented 2 years ago

在Build Settings---> Build Libraries for Distribution 设置为YES后, 会在framework里面生成一个.swiftinterface文件 但是又会出现另一个问题,详情见下面链接 https://stackoverflow.com/questions/65798857/xcframeworks-swiftinterface-breaks-compile-when-imported-with-swift-package-ma

建议把framwork名字和类名不要一样