最近通過(guò)jenkins打包生成的ipa上傳到fir.im上屿衅,掃描二維碼的時(shí)候總是提示無(wú)法安裝惠豺,一直沒(méi)找到原因扬虚,在尋找的過(guò)程中發(fā)現(xiàn)了Log Guru這個(gè)日志分析工具,能分析具體的原因樱哼。原文鏈接在此:http://fir.im/tools/log_guru
fir這里列出了幾種常見(jiàn)的原因:
1.證書(shū)被封:
(Invalid signing certificate (it may have expired or been revoked))
2.手機(jī)內(nèi)已安裝該應(yīng)用哀九,但是應(yīng)用的證書(shū)和當(dāng)前下載的證書(shū)不同:
profiled?(Note ) MC: Provisioning profiles changed
installd?0x100724000 -[MIInstallableBundle performVerificationWithError:]: 517: Upgrad? ? ? ? e's application-identifier entitlement string (證書(shū)前綴1.BundleID) does not match installed application's application-identifier string (證書(shū)前綴2.BundleID); rejecting upgrade.
解決方法:刪除舊的應(yīng)用,重新安裝搅幅。
3.框架不支持:
installd?0x2fe93000 install_application: Could not preflight application installitunesstored?0x15f6000 MobileInstallationInstall: failed with -1
installd?0x2fe93000 handle_install: API failed
解決方法:在Build Settings -->Valid Architectures中添加相應(yīng)的框架阅束。
4.沒(méi)有添加 UDID:
installd?profile not valid: 0xe8008012
installd?0x385000 install_embedded_profile: Could not install embedded profile: 0xe8008012
解決方法:添加該設(shè)備的 UDID
但我自己遇到了一個(gè)不再這4個(gè)里面的問(wèn)題,如下:
installd?0x16e1bb000 +[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]: 142: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.LfhDXF/extracted/Payload/4dBookCity.app : 0xe8008017 (A signed resource has been added, modified, or deleted.)
開(kāi)始以為是證書(shū)的問(wèn)題,翻來(lái)覆去的創(chuàng)建證書(shū)茄唐,發(fā)現(xiàn)不對(duì)息裸,經(jīng)過(guò)谷歌搜索發(fā)現(xiàn)Product Name和Product Module Name也會(huì)影響,然后把其復(fù)原為默認(rèn)設(shè)置發(fā)現(xiàn)也不行沪编,最終通過(guò)git版本比較發(fā)現(xiàn)在Build Settings的User Defined下面多了這個(gè)呼盆,這是因?yàn)橹鞍姹居肧wift開(kāi)發(fā)(發(fā)現(xiàn)Swift的包體積會(huì)比OC的大5MB),現(xiàn)在改為Objc的漾抬,但在Objc改成Swift的時(shí)候自動(dòng)生成了SWIFT_OBJC_BRIDGING_HEADER這個(gè)KEY宿亡,所以在Swift改為Objc的時(shí)候需要吧這個(gè)刪除常遂。到此終于解決纳令!