Xcode 4.6 - 分发配置文件的“未找到有效签名身份”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15228683/
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
Xcode 4.6 - "Valid signing identity not found" for Distribution provisioning profile
提问by abpetkov
I'm examining the process of submitting an app to the App Store and I'm having some kind of trouble here. I've been following this tutorial.
我正在检查向 App Store 提交应用程序的过程,但在这里遇到了一些麻烦。我一直在关注本教程。
I've created a Distribution Provisioning Profile, which I downloaded and added to Window - Organizer - Devices dragged in 'Provisioning Profiles' under the Library heading in the sidebar. What I see there is this:
我创建了一个分发配置文件,我下载并添加到窗口 - 管理器 - 拖入侧边栏库标题下的“配置文件”中的设备。我在那里看到的是:
I've tried revoking all my certificates and adding them once again to my Keychain Access, but it didn't help. Even after refreshing the provisioning profiles in Xcode.
我已经尝试撤销我的所有证书并将它们再次添加到我的钥匙串访问中,但它没有帮助。即使在 Xcode 中刷新配置文件之后。
Also, I've read that this happens often if I change the machine I'm working on, but this is not my case. I've developed the app on the same Mac, I'm on right now.
另外,我读到如果我更换我正在使用的机器,这种情况经常发生,但这不是我的情况。我已经在同一台 Mac 上开发了该应用程序,我现在正在使用。
I'm willing to provide more information to help reach to a solution to this problem if needed. Thanks for your help in advance.
如果需要,我愿意提供更多信息以帮助解决此问题。提前感谢您的帮助。
回答by LJ Wilson
Things to check:
检查事项:
Make sure in Keychain Access that the certificate you are needing to use has the private key stored with it.
Make sure the bundle identifier matches EXACTLY with what you have for the AppID (unless you are using the Wildcard identifier)
Make sure the provisioning profile you selected uses the certificate created.
Make sure that you download that provisioning profile and are using that to sign the distribution settings of the target.
确保在 Keychain Access 中您需要使用的证书具有存储在其中的私钥。
确保捆绑标识符与您拥有的 AppID 完全匹配(除非您使用通配符标识符)
确保您选择的配置文件使用创建的证书。
确保您下载该配置文件并使用它来签署目标的分发设置。
If all this is done, it should work fine.
如果所有这些都完成了,它应该可以正常工作。
Also, I gave a talk about certificates and provisioning for iOS. Here is a linkto the keynote PDF which explains the process of how I do things.
回答by Roozbeh Zabihollahi
Just restart XCode.
只需重新启动 XCode。
Sometimes everything done through the documentation, but XCode does not work properly.
有时一切都通过文档完成,但 XCode 无法正常工作。
回答by user107172
Solution: I solved my latest run with this issue by simply choosing a Development profile and Identity and building and running and then switching back to the Distribution profile and Distribution Identity.
解决方案:我通过简单地选择开发配置文件和标识并构建和运行,然后切换回分发配置文件和分发标识,解决了我最近运行的这个问题。
Background: My build was working last night, I switched to a different branch, tried signing the same way and it just continued to fail/say that there was no matching valid signing identity).
背景:我的构建昨晚正在工作,我切换到另一个分支,尝试以相同的方式签名,但它继续失败/说没有匹配的有效签名身份)。
I tried restarting Xcode, restarting Mac, deleting invalid/expired profiles etc. Then just out of a need to test a run, I switched to the development profile (I am testing IAP with the Distribution profile), then when I switched back, it just worked!
我尝试重新启动 Xcode,重新启动 Mac,删除无效/过期的配置文件等。然后只是出于测试运行的需要,我切换到开发配置文件(我正在使用分发配置文件测试 IAP),然后当我切换回来时,它刚刚工作!
One thing that is weird during this process is that the profile on the device does not seem to match the ones I have on disk, and during that process when I tried to add the one on disk to the device it was not highlighted as a valid selection (my dev one's were).
在此过程中奇怪的一件事是设备上的配置文件似乎与我在磁盘上的配置文件不匹配,并且在该过程中,当我尝试将磁盘上的配置文件添加到设备时,它没有突出显示为有效选择(我的开发者是)。
Even after running, the device still shows some different version of the same mobileprovision (different initial code and expiry is one day different than the one I have. I am working in a shared device environment so I don't have complete access/visibility to where these versions all came from).
即使在运行后,该设备仍然显示相同 mobileprovision 的一些不同版本(不同的初始代码和到期日与我拥有的不同。我在共享设备环境中工作,因此我没有完全访问/可见性这些版本都来自哪里)。
回答by brianLikeApple
If you are still stuck by this problem, try to do the whole process again.
如果您仍然被此问题卡住,请尝试再次执行整个过程。
Go to keychain, delete all the iPhone certificate and then do routine stuff. I faced this issue before for some reason, So I just redo it. Good thing is it won't take long time, just 5 mins : )
转到钥匙串,删除所有 iPhone 证书,然后执行常规操作。我之前因为某种原因遇到过这个问题,所以我只是重做。好消息是不会花很长时间,只需 5 分钟 :)
Hope this can help you.
希望这可以帮到你。
回答by jaminyah
I solved this issue by opening the KeyChain Utility and deleting expired provisioning profiles. I updated my profile at members page of developers.apple.com following all the instructions.
我通过打开 KeyChain Utility 并删除过期的配置文件解决了这个问题。我按照所有说明在 developer.apple.com 的会员页面更新了我的个人资料。
Then opened up my application with Xcode 4.6 . Under Build Settings selected iPhone Developer with my name.
然后用 Xcode 4.6 打开我的应用程序。在 Build Settings 下选择了我的名字的 iPhone Developer。
My issue was the old developer profile id and the new id were the same and I did not realize this. Removing the old one allowed the new to be used.
我的问题是旧的开发人员配置文件 ID 和新 ID 相同,我没有意识到这一点。移除旧的允许使用新的。