Jenkins自动打包iOS-Developer-OC

关于配置Jenkins自动打包错误总结

2017-03-22  本文已影响2252人  暴走小鱼人

错误一:

/var/folders/wg/x679y9p90_3298ln2hj3p3kw00007x/T/IXMA2VPqAt/Payload/*********.app/ResourceRules.plist: cannot read resources

在网上查了一些资料,解决方案是: Click on your project > Targets > Select your target > Build Settings >Code Signing Resource Rules Path 处添加

$(SDKROOT)/ResourceRules.plist。但是我所有用的Xcode8.2.1,已经没有 “Code Signing Resource Rules Path” 选项

解决方案: 

查看下图中,画红线的地方是否勾选,如果勾选,取消勾选即可。

错误二:

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 "*********"。

这种错误原因主要是项目中选择的证书跟选择的Team不匹配。

解决方案:

1. 重新选择工程中的Team,让Team与证书匹配。这种方法会使Jenkins与Xcode的配置相关联。如果开发人员在无意中修改了Xcode里的Team, 那么测试妹子通过Jenkins就无法打出相应的.ipa包

2. 我采用的方法是,在Jenkins执行 Xcode 构建之前,通过 增加构建步骤-> Execute shell,在脚本里指定正确的Team。例如

sed -i "" s/'DEVELOPMENT_TEAM = ********;'/'DEVELOPMENT_TEAM = ********;'/g  你的工程名称.xcodeproj/project.pbxproj

错误三:

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目录没有设定

解决方案:

因为我集成了cocoapods,集成后是workspace工程, 所以前面设定为 WORKSPACE

错误四:

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 在指定的目录下没有找到对应的profile文件

解决方案:

/Users/Shared/Jenkins/Library/MobileDevice/Provisioning Profiles   看看这个目录下面,有没有对应的profile文件,如果没有,可以手动拷贝相应的profile文件,如果中间某些目录(例如 :MobileDevice)缺失,也可以自己手动创建

错误五:

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.  等等第三方库报错,

原因是: Podfile 文件中使用了 use_frameworks!

不使用:

使用后:  

此时第三方库可以选择证书和profile会报错。

错误六:

/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)

原因: 私有库中有noClass_Video_Get_Host_V1 这个类,本地工程中没有删除干净,也存在 noClass_Video_Get_Host_V1 这个类,造成报错

解决方案:

删除本地中重复的类

如果有问题:请加834519879@qq.com ,大家一起研究

上一篇下一篇

猜你喜欢

热点阅读