【FAQ】Jenkins上,xcodebuild报错:No matching codesigning identity found

我在编译iOS APP。同样的命令:

xcodebuild -target "${TARGET_NAME}" -configuration "${BUILD_TYPE}" -sdk "${SDK_TYPE}" ONLY_ACTIVE_ARCH=NO build

在机器上执行正常,在jenkins上执行,就说签名匹配错误:

Check dependencies
Code Sign error: No matching codesigning identity found: No codesigning identities (i.e. certificate and private key pairs) matching “iPhone Distribution: xxxx.” were found.

** BUILD FAILED **


The following build commands failed:
	Check dependencies
(1 failure)
Build step 'Execute shell' marked build as failure

查来查去,发现是证书的安装位置问题:

因为jenkins运行在Mac的守护进程模式,只是认为它是一个不同的用户,所以不会有机会获得钥匙圈或提供个人资料作为您登录使用您的凭据,而我的证书是装在“登录”下的,这会导致代码签名有问题。

所以修改如下:

钥匙链中,右键点击在“登录”下的证书,拷贝,粘贴到“系统”里,就好了~



发布了64 篇原创文章 · 获赞 73 · 访问量 78万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章