Shell命令如下,
$ lipo -info libyuv-device.a
Architectures in the fat file: device/libyuv.a are: armv7 arm64
$ lipo -info libyuv-simulator.a
Architectures in the fat file: simulator/libyuv.a are: arm64 x86_64
$ lipo -create libyuv-device.a libyuv-simulator.a -output libyuv.a
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: libyuv-device.a and libyuv-simulator.a have the same architectures (arm64) and can't be in the same fat output file
如何lipo iOS设备和iOS模拟器的多个arm64 .a文件(在Apple Silicon上,例如M1)到一个单一的.一个文件?
1条答案
按热度按时间ee7vknir1#
我认为你应该输出一个XCFramework。
1 -使用
lipo
来合并每个平台的架构。2 -然后使用
xcodebuild -create-framework
合并平台。xcodebuild -create-xcframework -library libyuv-device.a -library libyuv-simulator.a -output libyuv.xcframework