xcode环境: 13.0
1、在 Build Settings ~> Build Library for Distribution 设为YES 。否则在生成 xcframework时 会报错“ No ‘swiftinterface’ files found within xx.swiftmodule ”
2、通过命令行生成.xcframework
xcodebuild -create-xcframework –output (xcframework名字) –framework
(framework路径) –framework (framework路径)。
eg:以SuperSDK 为例
xcodebuild -create-xcframework -framework /Users/fjdh/Desktop/Ad/iphoneSimulator/SuperSDK.framework -framework /Users/fjdh/Desktop/Ad/iPhone/SuperSDK.framework -output /Users/fjdh/Desktop/SuperSDK.xcframework
本文介绍如何在Xcode环境中生成xcframework。首先确保BuildSettings中的BuildLibraryforDistribution选项设置为YES,然后通过命令行使用xcodebuild创建xcframework。文章提供了一个具体的SuperSDK示例。
3444

被折叠的 条评论
为什么被折叠?



