錯(cuò)誤一:
/var/folders/wg/x679y9p90_3298ln2hj3p3kw00007x/T/IXMA2VPqAt/Payload/*********.app/ResourceRules.plist: cannot read resources
在網(wǎng)上查了一些資料,解決方案是: Click on your project > Targets > Select your target > Build Settings >Code Signing Resource Rules Path 處添加
$(SDKROOT)/ResourceRules.plist。但是我所有用的Xcode8.2.1涎嚼,已經(jīng)沒(méi)有 “Code Signing Resource Rules Path” 選項(xiàng)
解決方案:?
查看下圖中,畫(huà)紅線(xiàn)的地方是否勾選藕赞,如果勾選,取消勾選即可。
錯(cuò)誤二:
No certificate matching '***********************************' for team '*********':? Select a different signing certificate for CODE_SIGN_IDENTITY, a team that matches your selected certificate, or switch to automatic provisioning.
Provisioning profile "*********" belongs to team "***********************************", which does not match the selected team "*********"仙蛉。
這種錯(cuò)誤原因主要是項(xiàng)目中選擇的證書(shū)跟選擇的Team不匹配主巍。
解決方案:
1. 重新選擇工程中的Team,讓Team與證書(shū)匹配挪凑。這種方法會(huì)使Jenkins與Xcode的配置相關(guān)聯(lián)孕索。如果開(kāi)發(fā)人員在無(wú)意中修改了Xcode里的Team, 那么測(cè)試妹子通過(guò)Jenkins就無(wú)法打出相應(yīng)的.ipa包
2. 我采用的方法是,在Jenkins執(zhí)行 Xcode 構(gòu)建之前躏碳,通過(guò) 增加構(gòu)建步驟-> Execute shell搞旭,在腳本里指定正確的Team。例如
sed -i "" s/'DEVELOPMENT_TEAM = ********;'/'DEVELOPMENT_TEAM = ********;'/g ?你的工程名稱(chēng).xcodeproj/project.pbxproj
錯(cuò)誤三:
FATAL: Build directory does not exist at /Users/Shared/Jenkins/Home/workspace/MyTest_1/build/Release-iphoneos. Potential configuration issue.
Build step 'Xcode' marked build as failure菇绵。
原因是:Xcode插件下的 SYMROOT目錄沒(méi)有設(shè)定
解決方案:
因?yàn)槲壹闪薱ocoapods,集成后是workspace工程, 所以前面設(shè)定為 WORKSPACE
錯(cuò)誤四:
No profile matching 'getgetsetset5CommonTest' found:? Xcode couldn't find a profile matching 'getgetsetset5CommonTest'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the General tab of the target editor.
原因是: 1.Jenkins 在指定的目錄下沒(méi)有找到對(duì)應(yīng)的profile文件
解決方案:
/Users/Shared/Jenkins/Library/MobileDevice/Provisioning Profiles ? 看看這個(gè)目錄下面肄渗,有沒(méi)有對(duì)應(yīng)的profile文件,如果沒(méi)有咬最,可以手動(dòng)拷貝相應(yīng)的profile文件翎嫡,如果中間某些目錄(例如 :MobileDevice)缺失,也可以自己手動(dòng)創(chuàng)建
錯(cuò)誤五:
AFNetworking does not support provisioning profiles. AFNetworking does not support provisioning profiles, but provisioning profile getgetsetset5CommonTest has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. ?等等第三方庫(kù)報(bào)錯(cuò)永乌,
原因是: Podfile 文件中使用了 use_frameworks!
不使用:
使用后: ?
此時(shí)第三方庫(kù)可以選擇證書(shū)和profile會(huì)報(bào)錯(cuò)惑申。
錯(cuò)誤六:
/work/yd-jenkins/workspace/neibu-iphone-koolearn/Build/Intermediates/koolearnMotion.build/Release-iphoneos/koolearnMotion.build/Objects-normal/arm64/noClass_Video_Get_Host_V1.o
/work/yd-jenkins/workspace/neibu-iphone-koolearn/packageild/Sym.root/Release-iphoneos/noInterfaceLibrary/libnoInterfaceLibrary.a(noClass_Video_Get_Host_V1.o)
ld: 17 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
原因: 私有庫(kù)中有noClass_Video_Get_Host_V1 這個(gè)類(lèi),本地工程中沒(méi)有刪除干凈翅雏,也存在 noClass_Video_Get_Host_V1 這個(gè)類(lèi)圈驼,造成報(bào)錯(cuò)
解決方案:
刪除本地中重復(fù)的類(lèi)
如果有問(wèn)題:請(qǐng)加834519879@qq.com ,大家一起研究