問題一:真機(jī)模擬器庫無法合并豫尽,報錯:have the same architectures (arm64) and can't be in the same fat output file
lipo -create Release-iphoneos/xxxSDK.framework/xxxSDK Release-iphonesimulator/xxxSDK.framework/xxxSDK -output xxxSDK fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: Release-iphoneos/xxxSDK.framework/xxxSDK and Release-iphonesimulator/xxxSDK.framework/xxxSDK have the same architectures (arm64) and can't be in the same fat output file
XCode12之前:
編譯模擬器靜態(tài)庫支持i386 x86_64兩架構(gòu)
編譯真機(jī)靜態(tài)庫支持armv7 arm64兩架構(gòu)
使用lipo -create -output命令可以將兩個庫合并成一個支持模擬器和真機(jī)i386 x86_64 armv7 arm64四種架構(gòu)的胖子庫肖爵。
XCode12編譯的模擬器靜態(tài)庫也支持了arm64舔哪,導(dǎo)致出現(xiàn)真機(jī)庫和模擬器庫不能合并的問題。
have the same architectures (arm64) and can't be in the same fat output file
設(shè)置Build Setting --> Excluded Architectures --> Debug --> 添加上 arm64
設(shè)置Build Setting --> Excluded Architectures --> Release --> 添加上 arm64
出現(xiàn)的原因是XCode12 編譯的模擬器庫新增支持架構(gòu)arm64铺峭。
將模擬器的arm64給排除出去即可墓怀。