私有庫中集成了極光的庫,然后各種驗證失敗。
執(zhí)行pod lib lint 報錯混狠。
ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use --verbose for more information.
繼續(xù)想要查看更多錯誤信息 pod lib lint --verbose
ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code.
hhhhhhhhhhhh 然后仔細(xì)排查提示,發(fā)現(xiàn)下面這段話:
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, 那看極光文檔說3.0以后就不支持處理器為 i386的模擬器减俏。
解決辦法: 如果你是一個私有庫下有很多子庫,那么指定極光推送對應(yīng)的那個子庫arch碱工, 刨除 i386娃承, 具體代碼如下:
push.xcconfig = { 'VALID_ARCHS' => 'arm64 x86_64', }
如果你想設(shè)置私有庫全部使用指定arch的話奏夫,直接寫在最外邊就好了。