xcode 我可以使用开发人员证书存档,然后在提交期间使用分发证书重新签名吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9167613/
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
Can I archive with a Developer certificate, then re-sign it during submission with a Distribution certificate?
提问by Richard Venable
From what I understand, Xcode can re-sign an .ipa from an archive during the App store submission process, making it possible for you to create an archive with a Developer Provisioning Profile, and then sign it with a Distribution profile later. Here is a post that explains what I am talking about: http://oleb.net/blog/2011/06/code-signing-changes-in-xcode-4/
据我了解,Xcode 可以在 App Store 提交过程中从存档中重新签名 .ipa,这使您可以使用 Developer Provisioning Profile 创建存档,然后使用分发配置文件对其进行签名。这是一篇解释我在说什么的帖子:http: //oleb.net/blog/2011/06/code-signing-changes-in-xcode-4/
Unfortunately, I can't get it to work. When I create an archive using a Developer profile, then try to submit it with a Distribution profile, I get the following error: "Application failed codesign verification. The signature was invalid, contains disallowed entitlements or it was not signed with an iPhone Distribution Certificate"
不幸的是,我无法让它工作。当我使用开发人员配置文件创建存档,然后尝试使用分发配置文件提交它时,我收到以下错误:“应用程序未能通过代码验证。签名无效,包含不允许的权利或未使用 iPhone 分发证书签名”
The application does not use any entitlements and has no entitlements file. The error is correct that "it was not signed with an iPhone Distribution Certificate", because it was originally signed with a developer certificate, and I am attempting to resign it with a Distribution certificate. I thought this was a valid thing to do...
该应用程序不使用任何权利,也没有权利文件。错误是“它没有用 iPhone 分发证书签名”是正确的,因为它最初是用开发人员证书签名的,我试图用分发证书重新签名。我认为这是一个有效的做法...
采纳答案by mattjgalloway
The problem here is that when you originally archived it would have set the entitlements to be compatible with a developerprofile, such as the get-task-allowset to truebut you're re-signing using a distributionprofile which requires get-task-allowto be false. Unfortunately it can't go and change the entitlements and so you get this problem.
这里的问题是,当你最初归档它会设置的权利是与兼容开发的个人资料,如get-task-allow设置为true,但您使用的是重新签名分布要求的个人资料get-task-allow是false。不幸的是,它无法更改权限,因此您会遇到此问题。
I'm not entirely sure why Apple can't make it so that it can go and change the entitlements and do all the magic there. The code, resources, etc will all be the same after all.
我不完全确定为什么 Apple 不能做到这样它就可以改变权利并在那里发挥所有作用。毕竟代码、资源等都是一样的。

