Closed lexrus closed 4 years ago
我用如下脚本生成新的 xcframework:
xcodebuild archive -project "China.xcodeproj" \ -scheme "MonkeyKing" -configuration Release \ -sdk iphonesimulator \ -archivePath "Build/MonkeyKing/Simulator" \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES xcodebuild archive -project "China.xcodeproj" \ -scheme "MonkeyKing" -configuration Release \ -sdk iphoneos \ -archivePath "Build/MonkeyKing/iOS" \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES xcodebuild -create-xcframework \ -framework Build/MonkeyKing/Simulator.xcarchive/Products/Library/Frameworks/MonkeyKing.framework \ -framework Build/MonkeyKing/iOS.xcarchive/Products/Library/Frameworks/MonkeyKing.framework \ -output xcframeworks/MonkeyKing.xcframework
使用时会出现这些问题:
搜索了一下可能是因为这个 bug: https://forums.swift.org/t/frameworkname-is-not-a-member-type-of-frameworkname-errors-inside-swiftinterface/28962
我改了项目生成的 framework 的 target 的名字之后才可以正常编译使用...
还没研究过 XCFramework,有可能直接从 Package.swift 生成吗?😄
fixed in https://github.com/nixzhu/MonkeyKing/releases/tag/pre-1.17.0 @nixzhu
我用如下脚本生成新的 xcframework:
使用时会出现这些问题:
搜索了一下可能是因为这个 bug: https://forums.swift.org/t/frameworkname-is-not-a-member-type-of-frameworkname-errors-inside-swiftinterface/28962