XCode 5 中的签名身份问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19626276/
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
Signing identity problems in XCode 5
提问by MScottWaller
So I'm trying to validate an app for the purpose of beta testing, but when I try to validate an archive, it tells me:
所以我试图验证一个应用程序以进行 beta 测试,但是当我尝试验证一个存档时,它告诉我:
"No identities are available for signing"
“没有可用于签名的身份”
And when I hit the "Download Identities" button and choose from my development team, it says:
当我点击“下载身份”按钮并从我的开发团队中选择时,它说:
"No identities were available/ An administrator must request identities before they can be downloaded."
“没有可用的身份/管理员必须在下载身份之前请求身份。”
I've revoked my certificates and made them again, and I've deleted the provisioning profiles and made them all again for ad hoc distribution and development (I also deleted all the provisioning profiles from my keychain).
我已经撤销了我的证书并重新制作了它们,并且我已经删除了配置文件并重新制作了它们以进行临时分发和开发(我还从我的钥匙串中删除了所有配置文件)。
I made sure that my bundle identifier matches the app record in iTunes Connect and the distribution provisioning profiles I've created from the iOS Dev Center. The bundle identifiers match.
我确保我的包标识符与 iTunes Connect 中的应用程序记录以及我从 iOS 开发人员中心创建的分发配置文件相匹配。捆绑标识符匹配。
All of the certificates and distribution profiles show up under my "Accounts" under "Preferences" in XCode. The accounts shows that I have valid certificates and provisioning profiles.
所有证书和分发配置文件都显示在 XCode 中“首选项”下的“帐户”下。帐户显示我拥有有效的证书和配置文件。
I also made sure that the correct distribution provisioning profile was selected under "Code Signing" in the Build Settings.
我还确保在构建设置的“代码签名”下选择了正确的分发配置文件。
Any other ideas about what I could do, or what the problem might be?
关于我可以做什么,或者问题可能是什么的任何其他想法?
I've been scouring every stackflow post I could find. Tried the checked answer on this one most recently and it didn't work:
我一直在搜索我能找到的每一个 stackflow 帖子。最近在这个问题上尝试了检查答案,但没有用:
XCode 5 Crashes on AppStore Validation
Any other ideas?
还有其他想法吗?
采纳答案by BigCheesy
For me I had an Ad Hoc Distribution Profile but needed an App Store Distribution Profile.
对我来说,我有一个 Ad Hoc 分发配置文件,但需要一个 App Store 分发配置文件。
回答by Dave
Try following these instructions. Basically there are multiple places where you have to tell Xcode what your bundle identifier is and what the provisioning profile is. I can't believe this stuff is totally overlooked in the iOS Developer Distribution Guide by Apple.
尝试按照这些说明操作。基本上有很多地方你必须告诉 Xcode 你的包标识符是什么以及配置文件是什么。我不敢相信 Apple 的 iOS 开发人员分发指南中完全忽略了这些内容。
http://anthonytietjen.blogspot.com/2012/08/overcoming-trouble-validating-your.html
http://anthonytietjen.blogspot.com/2012/08/overcoming-trouble-validating-your.html
Also, go into Build Settings for your project and go to Code Signing. Make sure the Code Signing Identities are all set to the iDevice Distribution App ID you created in iTunes Connect as well as the Provisioning Profile set to the Provisioning Profile you painstakingly created in the iOS Development Center as well (that Ad Hoc provisioning profile file you created and downloaded into Xcode.)
此外,进入项目的构建设置并进入代码签名。确保代码签名标识都设置为您在 iTunes Connect 中创建的 iDevice Distribution App ID,以及设置为您在 iOS 开发中心精心创建的配置文件的配置文件(您创建的 Ad Hoc 配置文件并下载到 Xcode 中。)
Apple was great at walking you through creating the Distribution Certificate and Ad Hoc Provisioning Profile, but when it comes down to getting things bundled up in Xcode, they left a lot out.
Apple 非常擅长引导您创建分发证书和 Ad Hoc Provisioning Profile,但是当涉及到将东西捆绑在 Xcode 中时,他们遗漏了很多。
Also, I would say that if you still can't get it working with an Ad Hoc provisioning profile, try generating an App Store Distribution Provisioning Profile within the "Certificates, Identifiers, and Profiles" portion of the Development center , import it into Xcode (by refreshing the provisioning profile list under Xcode->preferences->accounts->details->refresh button) and go through the validation process of your archive again. I'm not sure if it's because Xcode can't validate an Archive with an Ad Hoc profile or what, but it seems to pick up the Distribution Provisioning Profile just fine and allows you to validate. Don't worry, even if you don't validate the archive with the Ad Hoc provisioning profile, you can still create the .ipa for your archive by hitting the Distribute button in Organizer->Archives and choosing the Ad Hoc profile so that you can beta test it.
另外,我想说,如果您仍然无法使用 Ad Hoc 配置文件,请尝试在开发中心的“证书、标识符和配置文件”部分生成 App Store Distribution Provisioning Profile,将其导入 Xcode (通过刷新 Xcode->preferences->accounts->details->refresh 按钮下的配置文件列表)并再次完成存档的验证过程。我不确定这是不是因为 Xcode 无法使用 Ad Hoc 配置文件验证存档或其他什么,但它似乎可以很好地获取分发配置文件并允许您进行验证。不用担心,即使您没有使用 Ad Hoc 配置文件验证存档,您仍然可以通过点击管理器中的分发按钮为您的存档创建 .ipa->
回答by Mirko Catalano
You have to install in your machine the certificates that you generate in you Apple account for development and distribution your app (these is not the provisioning profile)
您必须在您的机器上安装您在 Apple 帐户中生成的证书,用于开发和分发您的应用程序(这些不是配置文件)
回答by Mikael Kindborg
I just had the same problem. For me it worked to open Xcode Preferences dialog and select Accounts, click View Details and click the refresh icon. That downloaded the distribution provisioning profile I had created for my app. I could then create an archive and do Validate/Distribute.
我只是遇到了同样的问题。对我来说,打开 Xcode 首选项对话框并选择帐户,单击查看详细信息并单击刷新图标是有效的。这下载了我为我的应用程序创建的分发配置文件。然后我可以创建一个存档并进行验证/分发。
回答by plm
Summary of studying responses from all over. Get three things right.
来自各地的研究反馈总结。做好三件事。
1 - Your bundleIDhas to match what you have in the iTunesConnect, exactly.
CHECK: Xcode > Project>Info>Custom iOS Target Properties > Bundle Identifier
COMPARE IT TO:http://itunesconnect.apple.com> Manage Your Apps > [Your app name] > BundleID
2 - If you're building for AD HOCdistribution, don't try to upload to the iTunes store. You choose this when you pick your provisioning profile. If you want to upload to the iTunes store, you have to choose provisioning for APP STORE.
CHECK: http://developer.apple.com/membercenter> Certificates, Identifiers, Profiles > Provisioning Profiles> and click the plus sign to create your profile.
3 - Make sure that in your Xcode code signing is set up correctly. You need to have two things right here. You need to have one of your distribution identities selected AND you have to have the right provisioning profile selected in this section.
CHECK: Xcode > Project > Build Settings > Code Signing
1 -您bundleID必须匹配你在什么iTunesConnect,准确。
检查:Xcode > Project>Info>Custom iOS Target Properties > Bundle Identifier
比较:http : //itunesconnect.apple.com> Manage Your Apps > [Your app name] > BundleID
2 - 如果你是为AD HOC构建分发,不要尝试上传到 iTunes 商店。您在选择配置文件时选择此选项。如果你想上传到 iTunes 商店,你必须选择APP STORE 的配置。
检查:http: //developer.apple.com/membercenter> 证书、标识符、配置文件 > 供应配置文件> 并单击加号以创建您的配置文件。
3 - 确保您的 Xcode 代码签名设置正确。你需要在这里做两件事。您需要选择您的分发标识之一,并且必须在此部分选择正确的配置文件。
检查:Xcode > 项目 > 构建设置 > 代码签名