先來看下錯(cuò)誤信息
The Copy Bundle Resources build phase contains this target's Info.plist file '*******/Info.plist'.
Showing All Messages
error: failed to remove **********/Build/Intermediates.noindex/ArchiveIntermediates/*********/InstallationBuildProductsLocation/Applications/*******.app/Info.plist: “Info.plist” couldn’t be removed.
info.plist這種報(bào)錯(cuò)一般是我們自己替換或者移動(dòng)了XCode自動(dòng)生成的plist文件,而錯(cuò)誤的原因是因?yàn)楣こ痰腎nfo.plist文件已經(jīng)添加到 Copy Bundle Resource中。

圖1.png
解決辦法:
把所有的info.plist文件從 Copy Bundle Resource 移除就可以了(在圖1下方箭頭指向的位置)。
如果不清楚info文件名,可以在Targets -> Build Settings -> Packaging -> info.plist File 里面查看工程對(duì)應(yīng)的info文件,如圖2。
錯(cuò)誤原因:
這是因?yàn)槲覀兊墓こ藼uild Settings里面的info.plist file 已經(jīng)指定了文件路徑,當(dāng)編譯target時(shí),Xcode讀取編譯設(shè)置并且復(fù)制Info.plist參數(shù)到bundle中,所以Xcode會(huì)自動(dòng)處理Info.plist,我們不必添加這個(gè)文件到Build Phase 的 Copy Bundle Resources 中或者使它成為target的成員。

圖2.png