Jenkins打包iOS异常记录
证书问题
note: Using new build system
note: Building targets in parallel
note: Using codesigning identity override: iPhone Developer: G W (7BCD56C7X8)
note: Planning build
note: Constructing build description
error: Signing certificate is invalid. Signing certificate "iPhone Developer: G W (7BCD56C7X8)", serial number "<DVTSigningCertificateSerialNumber: 0x7fc34bda0ae0>", is not valid for code signing. It may have been revoked or expired. (in target 'Unity-iPhone' from project 'Unity-iPhone')
warning: OpenGLES is deprecated. Consider migrating to Metal instead. (in target 'Unity-iPhone' from project 'Unity-iPhone')
** ARCHIVE FAILED **
我发先问题的地方是: 钥匙串里的dev 证书设置成了 「允许范围之前确认」, 这样通过jinkens 打包,导致签名无法正常通过, 设置成「允许所有应用程序访问此项目」 打包脚本应该能正常工作了;
猜测是把dev证书的设置给还原了, 我安装证书的时候设置成了 「允许所有应用程序访问此项目」
xcode找不到
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
https://blog.csdn.net/li15809284891/article/details/79629190
出现这个问题的原因应该是机器上装了多个xcode,需要指定一个默认xcode启动路径,xcodebuild命令才知道要启动哪一个
1.xcodebuild -showsdks
报这个错xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
2.sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
/Applications/Xcode.app/Contents/Developer/
部分需要替换成自己mac上xcode的路径
3.xcodebuild -showsdks
会列出sdk的列表,表示设置成功
clean 失败
note: Using new build system error: Could not delete `/Users/gaojun/exportDir/iOS/Project_2020-10-30-23-24-46/build` because it was not created by the build system.
clean的时候删除build文件夹失败,手动删除掉,或者在shell里面调用rm -rf /Users/gaojun/exportDir/iOS/Project_2020-10-30-23-24-46/build
来删除