iOS 7.0 未找到代码签名标识
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19197497/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
iOS 7.0 No code signing identities found
提问by user2849317
- certificate is valid
- xcode 5
- iOS 7
- 证书有效
- 代码 5
- IOS 7
Code Sign error: No codesigning identities found: No codesigning identities (i.e. certificate and private key pairs) that match the provisioning profile specified in your build settings (“iOS Team Provisioning Profile: *”) were found. CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'
代码签名错误:未找到代码签名标识:未找到与构建设置中指定的配置文件(“iOS 团队配置文件:*”)匹配的代码签名标识(即证书和私钥对)。CodeSign 错误:SDK“iOS 7.0”中的产品类型“应用程序”需要代码签名
回答by Rajneesh071
For Certificate
证书
- Revoke Previous Certificate.
- Generate New Development Certificate.
- Download Certificate.
- Double Click to put in KeyChain.
- 撤销以前的证书。
- 生成新的开发证书。
- 下载证书。
- 双击放入钥匙串。
For Provisioning profile
对于配置文件
- Create New or Edit existing Provisioning profile.
- Download and install.
- 创建新的或编辑现有的供应配置文件。
- 下载并安装。
For BundleIdentifier.
对于 BundleIdentifier。
- com.yourcompanyName.Something (Put same as in AppId)
- com.yourcompanyName.Something(与 AppId 相同)
CodeSigningIdentity.
代码签名身份。
- Select The Provisioning profile which you created.
- 选择您创建的供应配置文件。
回答by christopher_h
My fix for this problem was:
我对这个问题的解决方法是:
Xcode > Preferences. In Accounts click on your Apple ID. Click View Details, click on your projects Provisioning Profile (I think this helps) and click the refresh button bottom left.
Xcode > 首选项。在帐户中单击您的 Apple ID。单击查看详细信息,单击您的项目配置文件(我认为这有帮助),然后单击左下角的刷新按钮。
回答by Max MacLeod
Thought I would supplement other answers with my own personal experience on this.
以为我会用我自己的个人经验补充其他答案。
Recently I had an issue whereby two targets would build, and two would fail with the following error:
最近我遇到了一个问题,即会构建两个目标,而两个目标会因以下错误而失败:
Code Sign error: No code signing identites found: No valid signing identities (i.e. certificate and private key pair) matching the team ID “XXXXXXXXXX” were found. CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.1'
代码签名错误:未找到代码签名身份:未找到与团队 ID“XXXXXXXXXX”匹配的有效签名身份(即证书和私钥对)。CodeSign 错误:SDK“iOS 7.1”中的产品类型“应用程序”需要代码签名
This was despite having updated everything in Xcode and on the iOS Developer Center.
尽管已经更新了 Xcode 和iOS Developer Center 中的所有内容。
The hint was that the team ID shown in the build failure message about was out of date.
提示是构建失败消息中显示的团队 ID 已过期。
Sure enough, opening Xcode's project.pbxproj
file in a Text editor found the old team id:
果然,project.pbxproj
在文本编辑器中打开 Xcode 的文件,找到了旧的团队 id:
D29A93A318AB96440099C177 = {
DevelopmentTeam = XXXXXXXXXX;
};
Incidentally, to get your project.pbxproj
file, select your .xcodeproj
file and do show contents as shown here:
顺便说一句,要获取您的project.pbxproj
文件,请选择您的.xcodeproj
文件并显示如下所示的内容:
Searching on the target Id D29A93A318AB96440099C177
, I could see that it matched one of the failing targets:
搜索目标 Id D29A93A318AB96440099C177
,我可以看到它匹配失败的目标之一:
targets = (
F5E8B19A16E64505006F22D4 /* MyTarget1 */,
93DB2342183F737100BEA69F /* MyTarget2 */,
D29A93A318AB96440099C177 /* MyTarget3 */,
D200F4B518AB968A00F58C21 /* MyTarget4 */,
F5E8B1C016E64505006F22D4 /* MyTarget5 */,
589FB35119114DED003D9350 /* MyTarget6 */,
);
In this case, MyTarget3
. To resolve, a simple text search replaced the old team Id with the new correct Id. Problem solved.
在这种情况下,MyTarget3
。为了解决这个问题,一个简单的文本搜索用新的正确 ID 替换了旧的团队 ID。问题解决了。
To Summarise, hopefully your situation will be resolved using the answers above rather than delving into the complexities of Xcode's project file. However, if it doesn't, and the error shows an invalid team ID, then it's worth checking to see if that team ID is still around.
总结一下,希望您的情况将使用上述答案解决,而不是深入研究 Xcode 项目文件的复杂性。但是,如果没有,并且错误显示无效的团队 ID,则值得检查该团队 ID 是否仍然存在。
回答by EddieHFu
I had the exact same problem in development. I solved it by
我在开发中遇到了完全相同的问题。我解决了
- Go to XCode preferences, view details of the Apple ID, and delete the provisioning file that's complaining.
- Go to the Keychain Access, and delete the development certificate that's related to the provisioning file you just deleted.
- In Apple Member Center, download the development provisioning file you just deleted locally, double click the file to make sure it's appearing in XCode.
- Download the development certificate you just deleted locally, and double click to make sure it appears in the Keychain Access.
- It should be good to go now.
- 转到 XCode 首选项,查看 Apple ID 的详细信息,然后删除抱怨的配置文件。
- 转到 Keychain Access,并删除与您刚刚删除的配置文件相关的开发证书。
- 在 Apple Member Center 中,将刚刚删除的开发配置文件下载到本地,双击该文件以确保它出现在 XCode 中。
- 在本地下载刚刚删除的开发证书,双击确保它出现在钥匙串访问中。
- 现在去应该不错。
回答by Daniel Ryan
I just had this problem with Jenkins.
我刚刚和詹金斯有这个问题。
The solution was to copy the certificate and paste it into the system keychain otherwise Jenkins couldn't read the certificate.
解决方案是复制证书并将其粘贴到系统钥匙串中,否则 Jenkins 无法读取证书。
回答by mj662
You should not have to delete all profiles to fix this issue,
您不必删除所有配置文件即可解决此问题,
When looking at my device profiles in the Organizer I saw one of my profiles was not valid. I then went to the Developer Certificates, Identifiers & Profiles pageand all profiles were active, green and looked good but when clicking edit on the one that showed as invalid on my device, I saw that the check box in the associated account was not checked even though Select All was checked. I checked the box to associate the profile with my certificate, downloaded the Profile and everything was fixed.
在管理器中查看我的设备配置文件时,我发现其中一个配置文件无效。然后我转到了开发人员证书、标识符和配置文件页面,所有配置文件都处于活动状态,绿色且看起来不错,但是当我在我的设备上显示为无效的配置文件上单击编辑时,我看到相关帐户中的复选框未被选中即使选中了全选。我选中了将配置文件与我的证书相关联的框,下载了配置文件,一切都已修复。
On your Profiles web page click "Edit"
在您的个人资料网页上单击“编辑”
You might see that there is no associated certificate even though "Select All" is checked.
即使选中了“全选”,您也可能会看到没有关联的证书。
回答by gklka
For me, setting Project → Targets/[Your project] → General → Team to "None" solved the issue.
对我来说,将 Project → Targets/[Your project] → General → Team 设置为“None”解决了这个问题。
回答by Philip Nelson
Having gone through a ridiculous amount of time trying to solve one of these, and I definitely can see where most of these answers could be correct in some cases, my situation was not all that uncommon.
在尝试解决其中一个问题花费了可笑的时间后,我绝对可以看出在某些情况下这些答案中的大多数可能是正确的,我的情况并不少见。
I was trying to deploy to the app store to test with TestFlight. A previous developer, no longer part of the project or company, had created the IOS Distribution Certificate. What xcode was trying to tell me was that yes, the certificate was in the member center, but dude you totally can't use it because it's not yours. I didn't have the private key needed to sign with it and no amount of refreshes, restarts, revokes were going to help me. You need a developer and distribution certificate to upload to the app store.
我试图部署到应用商店以使用 TestFlight 进行测试。以前的开发人员(不再是项目或公司的一部分)创建了 IOS 分发证书。xcode 试图告诉我的是,是的,证书在会员中心,但是老兄你完全不能使用它,因为它不是你的。我没有用它签名所需的私钥,并且没有多少刷新、重新启动、撤销对我有帮助。您需要开发者和分发证书才能上传到应用商店。
The solution was to create a new production distribution certificate in the member center, using a new signing request from my keychain. This process is documented well and described while you create the cert online. Once done, refresh your account in xcode to download to your keychain and you will be golden. I hope this helps somebody!
解决方案是使用来自我的钥匙串的新签名请求在会员中心创建一个新的生产分发证书。当您在线创建证书时,此过程已被很好地记录和描述。完成后,在 xcode 中刷新您的帐户以下载到您的钥匙串,您将获得成功。我希望这对某人有所帮助!
回答by Silviu St
it might sound strange but for me worked restarting my mac..i cant explain why and what happened but it works now. hope it will helps someone
这听起来可能很奇怪,但对我来说,重新启动了我的 mac ..我无法解释为什么以及发生了什么,但它现在可以工作了。希望它会帮助某人
回答by Bochun Bai
I reached this thread when I am using pure command line/jenkins build script and I don't want any single UI/RDP manually setup for the integration environment.
当我使用纯命令行/jenkins 构建脚本并且我不希望为集成环境手动设置任何单个 UI/RDP 时,我到达了这个线程。
After a few hours try to solve exactly the same issue using jenkins.
The key is "security list-keychains -s <your_keychain_name>"
几个小时后,尝试使用 jenkins 解决完全相同的问题。
密钥是“security list-keychains -s <your_keychain_name>”
--- Long story ---
I use a script in jenkins to override per-project settings (provisioning profile and signing identities)
After upgrade to Xcode 7, I have to change the script add above "list-keychains" after "create-keychains"
---
长话短说---我在 jenkins 中使用脚本来覆盖每个项目的设置(配置文件和签名身份)
升级到 Xcode 7 后,我必须在“创建-钥匙扣”