xcodebuild在cron下找不到正确的iOS开发证书 [英] xcodebuild cannot find correct iOS Development Certificate under cron

查看:104
本文介绍了xcodebuild在cron下找不到正确的iOS开发证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用xcodebuild命令行工具来构建该应用程序并将其部署到iPhone,如下所示.

I am currently using xcodebuild command line tool to build and deploy the app to iPhone as follows.

我在登录密钥链中看到iOS开发证书确实存在,但是密钥与输出中显示的Key1不匹配.我的问题是如何允许xcodebuild选择钥匙串中当前存在的正确的iOS开发证书.

I saw in my login keychain that the iOS Development Certificate does exist but the key does not match Key1 as shown in the output. My question is how to allow xcodebuild to pick the correct iOS Development Certificate that is currently in the keychain.

构建命令

HOME=/Users/mcj xcodebuild build-for-testing -project ios/ios_test_app/HXKPIIOS/HXKPIIOS.xcodeproj -scheme HXKPIIOS -destination 'platform=iOS,id=<iPhoneUDID>' -derivedDataPath /opt/HX/HXKPI_Logs/kpi18_iOS_2018-06-23-21-20-01-149882/<iPhoneUDID>/build_derived_data | tee /opt/HX/HXKPI_Logs/kpi18_iOS_2018-06-23-21-20-01-149882/<iPhone UDID>/uitest/build1.log

输出

User defaults from command line:
    IDEDerivedDataPathOverride = /opt/HX/HXKPI_Logs/kpi18_iOS_2018-06-23-21-20-01-149882/<iPhoneUDID>/build_derived_data

=== BUILD TARGET HXKPIIOS OF PROJECT HXKPIIOS WITH CONFIGURATION Debug ===

Check dependencies
Code Signing Error: No signing certificate "iOS Development" found:  No "iOS Development" signing certificate matching team ID "<Key1>" with a private key was found.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.2'

推荐答案

转到项目导航器" >>常规"选项卡.查找签名"部分,您将看到您的团队,配置文件,签名证书和签名状态.您的状态可能有问题,因为您无法登录帐户.在这种情况下,只需按登录...,然后重新输入您的凭据即可.或者,也许您是在没有签名的团队中登录的.在这种情况下,转到团队"部分,只需更改您登录的团队即可.最后,在签名"部分中检查您的签名证书.如果它为空,这就是Xcode无法识别您的证书的原因.

Go to the Project Navigator >> "General" tab. Look for the "Signing" section and you will see your Team, Provisioning Profile, Signing Certificate, and your Signing Status. Perhaps there is an issue with your Status as you were unable to sign in with your account. In that case, simply press Sign In... and re-enter your credentials. Or, perhaps, you are signed in on a team that does not have your Signing. In that case, go to the Team section and simply change which team you are signed in with. And finally, check your signing certificate in the Signing section. If its empty, that's why Xcode doesn't recognize your certificate.

这篇关于xcodebuild在cron下找不到正确的iOS开发证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆