Xcode 中用于 iphone 应用程序分发的代码验证失败

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3774546/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 19:46:33  来源:igfitidea点击:

Codesign verification failed in Xcode for iphone app distribution

iphonexcodecertificatedistribution

提问by Mark Cicero

I am trying to prepare my app for distribution to the app store and am getting the following warning in Xcode which is causing an error in ApplicationLoader. I know this is a common problem from searching but I have yet to find a proper solution? I went thru Apple's steps for distribution on the iOS provisioning portal and still get this error.

我正在尝试准备我的应用程序以分发到应用程序商店,并且在 Xcode 中收到以下警告,这导致 ApplicationLoader 出现错误。我知道这是搜索中的常见问题,但我还没有找到合适的解决方案?我在 iOS 配置门户上执行了 Apple 的分发步骤,但仍然收到此错误。

My distribution profile is set on my Target.

我的分布配置文件设置在我的目标上。

"Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)"

“应用程序未通过协同签名验证。签名无效,或者未使用 Apple 提交证书签名。(-19011)”

Any suggestions?

有什么建议?

回答by Vivek Rajanna

1) Check for the scheme in 4.2 2) make sure you have selected the release scheme 3) make sure you have selected the distribution profile 4) build for archiving .

1) 检查 4.2 中的方案 2) 确保您已选择发布方案 3) 确保您已选择分发配置文件 4) 为归档而构建。

回答by jer

App distribution certificate is only used for the app store. You will get this error if you try and put an app signed with your distribution certificate on your phone -- it simply won't work.

应用分发证书仅用于应用商店。如果您尝试将使用您的分发证书签名的应用程序放在您的手机上,您将收到此错误 - 它根本无法工作。

回答by hotpaw2

Do you have a valid iPhone Distribution certificate in your Keychain?

您的钥匙串中是否有有效的 iPhone 分发证书?

Does the Xcode Organizer Provisioning Profile window show your Distribution provision?

Xcode Organizer Provisioning Profile 窗口是否显示您的 Distribution 配置?

Does your distribution provisioning profile have an app ID that is the same or compatible (wildcard) with the Identifier setting in your Target Info Properties setting?

您的分发配置文件是否具有与目标信息属性设置中的标识符设置相同或兼容(通配符)的应用程序 ID?

Edit: added:

编辑:补充:

Do you have exactly one iPhone Distribution certificate in your Keychain?

您的钥匙串中是否只有一个 iPhone 分发证书?

Did you do a Build Clean in Xcode before your distribution build? (or rm -rf ./build)

在发行版构建之前,您是否在 Xcode 中进行了 Build Clean?(或 rm -rf ./build)

回答by sandy

First of all, check your Certificate, is it distribution or developer? And it must be Distribution certificate.

首先,检查您的证书,是发行版还是开发者?并且必须是分销证书。

Follow these steps:

按着这些次序:

  1. clean all certificate from your keychain and download new distribution certificate.

  2. Also clean remove the distribution provisioning profile what you use for the particular for your this application and re download that one. after that must be clean build in Xcode and after that in project setting you must be select the particular D.P.P. for your application and go a head just only build it. then you get the particular build.

  3. Regarding the D.P.P you must be clear what type of profile you create for this. it must be Appstore D.P.P.

  1. 清除钥匙串中的所有证书并下载新的分发证书。

  2. 还要干净地删除您用于此应用程序的特定配置的分发配置文件,然后重新下载该配置文件。之后必须在 Xcode 中进行干净构建,然后在项目设置中,您必须为您的应用程序选择特定的 DPP,然后只构建它。然后你会得到特定的构建。

  3. 关于 DPP,您必须清楚为此创建的配置文件类型。必须是 Appstore DPP

I hope it should be helpful for you.

我希望它对你有帮助。

回答by Matt Sich

I had a similar problem. For me it turns out that I didn't download the "distribution" provisioning file (note the emphasis on the "distribution"). Once I got that, everything worked. I'm almost certain that that's what your problem is ;)

我有一个类似的问题。对我来说,事实证明我没有下载“分发”配置文件(注意对“分发”的强调)。一旦我得到了它,一切都奏效了。我几乎可以肯定这就是你的问题;)

cheers, Matt

干杯,马特