合并真機(jī)與模擬器的靜態(tài)庫(.a)

制作真機(jī)靜態(tài)庫時(shí),不能連接特定的真機(jī)設(shè)備制作,不然只能在特定機(jī)型上使用;

制作模擬器靜態(tài)庫時(shí),iphone4,5使用的是386 ?iphone5s至以后使用的是X86-64位,所以要設(shè)配這兩種模態(tài)。

先做好真機(jī)與模擬器的靜態(tài)庫,打開終端管理器,輸入lipo -create +(真機(jī)及模擬器的靜態(tài)庫文件)(直接拖動(dòng)相應(yīng)文件進(jìn)來會(huì)自動(dòng)生成地址) + -output ?+(輸出的地址)


lipo -create /Users/**/Desktop/cblt/1/test.a /Users/**/Desktop/cblt/2/test.a -output /Users/**/Desktop/cblt/3/Utest.a


輸出時(shí)遇到bug:

xcodebuild[6384:366166] [MT] PluginLoading: Required plug-in compatibility UUID****** for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/VVDocumenter-Xcode.xcplugin' not present in DVTPlugInCompatibilityUUIDs

解決方案:

在終端中輸入以下命令:

XCODEUUID=`defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID`

for f in ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/*; do defaults write "$f/Contents/Info" DVTPlugInCompatibilityUUIDs -array-add $XCODEUUID

>done

然后再調(diào)用上面的方法即OK

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容