Jenkins 自动打包上传 fir/fastlane等配置通用
2018-01-04 本文已影响0人
进击的巨人Alan
脚本自行解决
安装Jenkins
安装遇到其他问题请自行搜索解决.
1.fir build_ipa No applicable devices found
ErrorDomain=IDEDistributionErrorDomainCode=14"No applicable devices found."UserInfo=0x7ff1a72ddd80{NSLocalizedDescription=No applicable devices found.}**EXPORT FAILED**
解决办法:
2. Xcode 8.3 后移除了packageapplication
可以使用如下命令替换
xcodebuild -exportArchive -archivePath "$archivePath" -exportOptionsPlist "$exportOptionsPlist" -exportPath "fir_build/${ipa_name}"
echo "===Finished. Total time: ${SECONDS}s==="
3.此处为构建环境中 keychains and code signing Identities 或 Mobile Provisioning Profiles 路径配置不对 可暂时移除 该配置后面讲述配置方法
错误:java.lang.NullPointerException

4. iOS: xcodebuild: error: The workspace '' does not contain a scheme named ''
找不到scheme问题,直接在本地项目目录下脚本正常,但是在Jenkins目录下不行
解决办法: scheme中勾选shared

5.Git 此处使用的为Gitlab,如果gitlab使用的公钥在Jenkins中需要配置私钥


5. keychains 配置前需要 需要安装插件

6.keychain配置
系统管理 找到keychain




关于Code Signing Identity 可以右击.xcodeproj打开project.pbxproj

xcode中需要如上图配置不能配成automatic的

参考链接:
http://www.jianshu.com/p/bd4c22952e01
http://www.jianshu.com/p/4cf4e45a4411
http://www.cocoachina.com/ios/20160804/17281.html