私有庫(kù)中集成了極光的庫(kù),然后各種驗(yàn)證失敗。
執(zhí)行pod lib lint 報(bào)錯(cuò)。
ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use --verbose for more information.
繼續(xù)想要查看更多錯(cuò)誤信息 pod lib lint --verbose
ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.
hhhhhhhhhhhh 然后仔細(xì)排查提示,發(fā)現(xiàn)下面這段話(huà):
NOTE | [xx/xx] xcodebuild: ld: warning: ignoring file /Users/xx/Downloads/xx.git/xx/xx/JPushSDK/libjpush-ios-3.1.2.a, missing required architecture i386 in file /Users/xx/Downloads/xx.git/xx/xx/JPushSDK/libjpush-ios-3.1.2.a (4 slices) - NOTE | [xx/xx] xcodebuild: ld: warning: ignoring file /Users/xx/Downloads/xx.git/xx/xx/JPushSDK/libjcore-ios-1.2.6.a, missing required architecture i386 in file /Users/xx/Downloads/xx.git/xx/xx/JPushSDK/libjcore-ios-1.2.6.a (4 slices)
里面很明顯提到了 missing required architecture i386, 那看極光文檔說(shuō)3.0以后就不支持處理器為 i386的模擬器。
解決辦法: 如果你是一個(gè)私有庫(kù)下有很多子庫(kù),那么指定極光推送對(duì)應(yīng)的那個(gè)子庫(kù)arch, 刨除 i386, 具體代碼如下:
push.xcconfig = { 'VALID_ARCHS' => 'arm64 x86_64', }
如果你想設(shè)置私有庫(kù)全部使用指定arch的話(huà),直接寫(xiě)在最外邊就好了。