Xcode - 可执行文件仅在 RELEASE 模式下使用无效权利签名
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30801082/
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 - The executable was signed with invalid entitlements only in RELEASE mode
提问by Bart?omiej Semańczyk
This question is similar to The executable gets signed with invalid entitlements in Xcode. But the difference is that for me it is working for debugmode:
这个问题类似于The executable gets signed with invalid entitlements in Xcode。但不同的是,对我来说,它适用于调试模式:
but doesn't work for releasemode:
但不适用于发布模式:
For releasei got an exception:
对于发布,我有一个例外:
However everything is fine for DEBUG: How to make it working for both: release and debug?
然而,对于DEBUG 来说一切都很好:如何使它同时适用于:发布和调试?
回答by Nookie_IN
Invariably this error is caused by a mismatch between your provisioning profile and your distribution certificate. Typically, Apple allows an organization to have two distribution certificates and when a provisioning profile is created - it is associated with one or the other. In order to correctly sign an ipa, the distribution certificate AND private key on the Mac where the signing is occurring must match that which was selected when the provisioning profile was created.
这个错误总是由您的配置文件和您的分发证书之间的不匹配引起的。通常,Apple 允许组织拥有两个分发证书,并且在创建配置文件时 - 它与一个或另一个相关联。为了正确签署 ipa,进行签名的 Mac 上的分发证书和私钥必须与创建配置文件时选择的相匹配。
To check which distribution certificate you have access your keychain
检查您有权访问钥匙串的分发证书
Go to Xcode's Organizer and click on all the Profiles, check if they are valid. Xcode throw up warning text if say, something is missing in Keychain.
转到 Xcode 的管理器并单击所有配置文件,检查它们是否有效。如果说钥匙串中缺少某些东西,Xcode 会抛出警告文本。