xcode 应用程序未通过协同设计验证。我该怎么办?

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

Application failed codesign verification. What do I do?

iphonexcodeipadios4certificate

提问by Defender Of The Code

XCode gives me this warning when I build the app for release.

当我构建要发布的应用程序时,XCode 给了我这个警告。

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

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

Do I need to delete all entries from my keychain and redo getting a certificate, provisioning profile, etc?

我是否需要从我的钥匙串中删除所有条目并重新获取证书、配置文件等?

I can build and debug on the iPhone and iPad without a problem.

我可以毫无问题地在 iPhone 和 iPad 上进行构建和调试。

If you know how I can solve this dilemma, please provide exact steps or a way for me to contact you about this.

如果您知道我如何解决这个难题,请提供确切的步骤或方式,以便我就此与您联系。

Thanks

谢谢

----UPDATE -----

- - 更新 - - -

Build Log

Validate build/Release-iphoneos/iApp.app cd "/Users/iosdeveloper/Documents/Programming/iPad/iApp HD" setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" setenv PRODUCT_TYPE com.apple.product-type.application /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation "/Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app"

warning: Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011) Executable=/Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app/iApp codesign_wrapper-0.7.10: using Apple CA for profile evaluation /Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app: valid on disk /Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app: satisfies its Designated Requirement test-requirement: failed to satisfy code requirement(s) codesign_wrapper-0.7.10: failed to execute codesign(1) - (null)

构建日志

验证 build/Release-iphoneos/iApp.app cd "/Users/iosdeveloper/Documents/Programming/iPad/iApp HD" setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin :/usr/bin:/bin:/usr/sbin:/sbin" setenv PRODUCT_TYPE com.apple.product-type.application /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation "/Users/iosdeveloper/ Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app"

警告:应用程序未通过协同设计验证。签名无效,或未使用 Apple 提交证书签名。(-19011) Executable=/Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app/iApp codesign_wrapper-0.7.10:使用Apple CA进行配置文件评估/Users/iosdeveloper/Documents/ Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app:在磁盘上有效/Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app:满足其指定的要求测试-要求:未能满足代码要求 codesign_wrapper-0.7.10:未能执行 codesign(1) - (null)

回答by Eric

Here's the checklist I go through when I've hit this:

这是我遇到这个问题时经过的清单:

  1. Clean all targets, exit Xcode, then go drag the build folder from your project to the trash.

  2. Do the Get Info on your project, make sure the Code Signing Entitlements and Code Signing Identity are selected correctly. Do the same for your Targets.

  3. Login to the iOS Provisioning Portal and make sure the Distribution certificate has not expired. Also check the Distribution Provisioning Profile and make sure it is Active. Make sure the Certificate is properly in your Keychain and the Distribution profile is in Xcode Organizer (if you have multiple of the same one, delete all but the correct one and redo step #2).

  4. Look at your Build Results on the failure and identify which profile it is actually using and make sure it is the right one.

  1. 清理所有目标,退出 Xcode,然后将构建文件夹从您的项目拖到垃圾箱。

  2. 对您的项目执行获取信息,确保正确选择了代码签名权利和代码签名标识。为你的目标做同样的事情。

  3. 登录 iOS Provisioning Portal 并确保分发证书未过期。还要检查分发供应配置文件并确保它处于活动状态。确保证书在您的钥匙串中正确,并且分发配置文件在 Xcode Organizer 中(如果您有多个相同的,请删除除正确的以外的所有内容并重做第 2 步)。

  4. 查看有关失败的构建结果并确定它实际使用的是哪个配置文件并确保它是正确的。

回答by Ben

You probably need to check what code signing profile is selected in your distribution build properties.

您可能需要检查在您的发行版构建属性中选择了什么代码签名配置文件。

回答by anonymous

It looks like your target is "Development" but Xcode applied some of distribution settings to it, so the warning simply means your ad-hoc build has no valid AppStore submission certificate. Go to your target settings, choose the Release configuration and uncheck "Validate Built Product" option.

看起来您的目标是“开发”,但 Xcode 对其应用了一些分发设置,因此警告仅表示您的临时构建没有有效的 AppStore 提交证书。转到您的目标设置,选择发布配置并取消选中“验证内置产品”选项。

回答by suresh

Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011) i am got the Same Warning Message...

应用程序未通过协同设计验证。签名无效,或未使用 Apple 提交证书签名。(-19011) 我收到了同样的警告信息...

I just Changed to iOs Deployment target 4.3 to 3.2.2 its works perfectly .....

我刚刚更改为 iOs 部署目标 4.3 到 3.2.2 它的工作完美......

回答by Stan Sieler

Note: you may have to go to XCode's "Project" and select "Edit Active Target (appname)", which is near the bottom of the list ... in the new pane that opens, select "Build", then under "Code Signing Identity" select your distribution provision. Note that this seems to be editing a different thing than "Project" / "Edit Project" (editing "target" instead of "project"). I found I had to edit both project and target's code signing identities.

注意:您可能必须转到 XCode 的“项目”并选择位于列表底部附近的“编辑活动目标(应用程序名称)”...在打开的新窗格中,选择“构建”,然后在“代码”下签名身份”选择您的分发条款。请注意,这似乎是在编辑与“项目”/“编辑项目”不同的东西(编辑“目标”而不是“项目”)。我发现我必须同时编辑项目和目标的代码签名身份。

回答by Nicolinux

I had exactly the same problem. It was due to installing Xcode 4.0.2 and 4.2 preview 3 at the same time. Removed both (through the provided uninstall scripts):

我遇到了完全相同的问题。这是因为同时安装了 Xcode 4.0.2 和 4.2 preview 3。删除了两者(通过提供的卸载脚本):

<Xcodedir>/Library/uninstall-devtools --mode=all

Then rebooted and installed 4.0.2 and it works :/

然后重新启动并安装 4.0.2,它可以工作:/

回答by Joe Fratianni

I have found the codesign process a headache - I always shudder when I get am ready to use Ad Hoc distribution to beta test. After the usual round of errors and failed fix attempts I ignored the "application failed codesign" error and sent the build to a beta tester. It worked without issue.

我发现协同设计过程令人头疼——当我准备好使用 Ad Hoc 发行版进行 beta 测试时,我总是不寒而栗。在通常的一轮错误和失败的修复尝试之后,我忽略了“应用程序协同设计失败”错误并将构建发送给 beta 测试人员。它没有问题。

Very frustrating.

非常令人沮丧。

回答by Bobjt

In the build log provided in the -UPDATE- section of the original post the root causeof the failed signature verification is expressed with the text: "test-requirement: code failed to satisfy specified code requirement(s)". That particular flavor of failed signature verification is almost always caused by mistakenly signing your app with an iPhone Developer profile instead of an iPhone Distribution profile.

在原始帖子的 -UPDATE- 部分提供的构建日志中,签名验证失败的根本原因用文本表示: “测试要求:代码未能满足指定的代码要求”。签名验证失败的这种特殊情况几乎总是由错误地使用 iPhone 开发人员配置文件而不是 iPhone 分发配置文件签署您的应用程序引起的。

It can be confirmed with the steps in "How do I verify the certificate that was used to sign my app?". If the certificate "Identity" is "iPhone Developer: YOUR_NAME" instead of "iPhone Distribution: ..." that is the reason for the "Application failed codesign verification"error, and you can resolve it by performing the following steps:

可以通过“如何验证用于签署我的应用程序的证书?”中的步骤进行确认。如果证书“身份”是“iPhone Developer: YOUR_NAME”而不是“iPhone Distribution: ...”,这就是“Application failedcodesign verify 错误的原因,您可以通过执行以下步骤来解决它:

1a). if you have not yet created an App Store Distribution Provisioning Profile yet, that is done on the "Distribution" tab of the "Provisioning" Section of the iOS Portal site.

1a)。如果您尚未创建 App Store Distribution Provisioning Profile,请在 iOS 门户站点“Provisioning”部分的“Distribution”选项卡上创建

Note, the "Distribution" tab is only available to Team Members whose role is either "Agent" (the one who signed up for the iOS Developer Program), or "Admin" (those that the Agent grant access to app-distribution capabilities).

请注意,“分发”选项卡仅适用于角色为“代理”(注册 iOS 开发人员计划的人)或“管理员”(代理授予应用分发功能访问权限的人)的团队成员.

1b). if you're fairly certain you have an App Store Distribution Provisioning Profile installed in your Xcode profile library, you can verify it is an App Store profile as well as the App ID associated to it by using the steps in section How do I confirm my Provisioning Profile is for App Store distribution?

1b)。如果您相当确定在 Xcode 配置文件库中安装了 App Store Distribution Provisioning Profile,则可以使用如何确认我的Provisioning Profile 适用于 App Store 分发吗?

2). verify that your Scheme 'Archive' task is mapped to "Release" using the steps in section: "Creating an Application Archive"

2)。使用“创建应用程序存档”部分中的步骤验证您的方案“存档”任务是否映射到“发布”

3). check that you have an your App Store provisioning profile assigned to your "Release" Code Signing Identity using the steps in section "Assigning Provisioning Profiles to Build Configurations".

3)。使用“将供应配置文件分配给构建配置”部分中的步骤检查您的 App Store 供应配置文件是否已分配给您的“发布”代码签名标识。

Note: it's important to make these changes at the Target level Build Settings, versus the Project level ones, as Target settings override Project ones...you can think of the Project level build settings as 'defaults' to populate target settings (and any future targets) with. Also, Ensure the "All" button is depressed in the upper-left corner of Target Build Settings to reveal the "Code Signing Identity" section.

注意:在目标级别构建设置而不是项目级别进行这些更改很重要,因为目标设置会覆盖项目设置......您可以将项目级别构建设置视为填充目标设置(以及任何未来目标)与。此外,确保按下目标构建设置左上角的“全部”按钮以显示“代码签名身份”部分。

4). retry your Product > Archive.

4)。重试您的产品 > 存档。

If the issue persists after the above, I recommend continuing onto Apple's complete list of potential causes of this error at the following URL "How do I resolve the error: Application failed codesign verification?"

如果在上述操作后问题仍然存在,我建议继续在以下 URL 上查看 Apple 提供的此错误潜在原因的完整列表“如何解决错误:应用程序未能通过代码验证?”

回答by Wytze

My problem was solved when I noticed that I only had a "team" provisioning profile, and the details in iOS Dev Center told me that it was not a profile fit for development because it had no device attached. So I created a second provisioning profile, which let me check the box for my device so that it had a device attached.

当我注意到我只有一个“团队”配置文件时,我的问题就解决了,iOS 开发中心的详细信息告诉我它不适合开发,因为它没有附加设备。所以我创建了第二个配置文件,它让我选中我的设备的框,以便它连接了一个设备。

Then when validating or submitting the app from the Organizer window (after pressing 'Build and archive'), I first made the mistake of selecting this new profile as the code signing profile. That was wrong. The profile that worked was iPhone Developer.

然后在从管理器窗口验证或提交应用程序时(按“构建和存档”后),我首先错误地选择了这个新配置文件作为代码签名配置文件。那是错误的。有效的配置文件是 iPhone Developer。

Good luck!

祝你好运!

PS: This whole submission process is a heap of abacadabra. Do you really have to create a zillion distribution profiles, provisioning profiles, etc.? It hasn't encouraged me in any way to better test my app. I already did that before I chose to upload, and clicking a hundred buttons labeled 'Create','Download' and 'Submit' isn't really a quality control process that added anything (well except being forced to buy an iPad and test on that). Who ever said iOS was developer friendly?

PS:整个提交过程就是一堆阿巴卡达布拉。您真的需要创建无数的分发配置文件、配置文件等吗?它没有以任何方式鼓励我更好地测试我的应用程序。在我选择上传之前,我已经这样做了,点击一百个标有“创建”、“下载”和“提交”的按钮并不是一个真正添加任何东西的质量控制过程(除了被迫购买 iPad 并测试那)。谁说过 iOS 对开发者友好?