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