应用程序协同设计验证失败

发布于 2024-09-18 03:55:03 字数 691 浏览 6 评论 0原文

这是我提交到应用程序商店的第一个应用程序,我按照苹果指南做了所有事情,但是当我最终尝试使用发行版配置进行构建时,我收到一个错误和一个警告。这是我的错误和警告的构建日志,我想知道是否有人可以告诉我这里发生了什么。

warning: Application failed codesign verification.  The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
failed to extract requirements data: 1
/Users/xxxx/Desktop/xxxx/build/Distribution-iphoneos/xxxxx.app: object file format invalid or unsuitable
failed to extract entitlements: 1
 - (null)

另外,

    /Users/xxxxxx/Desktop/xxxxx/build/Distribution-iphoneos/xxxxxxx.app: object file format invalid or unsuitable
Command /usr/bin/codesign failed with exit code 1

这是怎么回事?

This is my first app being submitted to the app store, and I did everything according to the apple guide, but when I finally tried to build with the distribution configuration, I get one error and one warning. This is my build log of the error and warning, and I was wondering if anyone could tell me what is going on here.

warning: Application failed codesign verification.  The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
failed to extract requirements data: 1
/Users/xxxx/Desktop/xxxx/build/Distribution-iphoneos/xxxxx.app: object file format invalid or unsuitable
failed to extract entitlements: 1
 - (null)

Also,

    /Users/xxxxxx/Desktop/xxxxx/build/Distribution-iphoneos/xxxxxxx.app: object file format invalid or unsuitable
Command /usr/bin/codesign failed with exit code 1

What is going on?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

霞映澄塘 2024-09-25 03:55:03

您必须确保在构建设置中选择了正确的证书。对于每个配置文件,您有不同的设置。因此,如果您使用“Release”作为 AppStore 构建,则必须转到项目设置并将“Code Sign Identity”设置为正确的开发人员证书。

对目标执行相同的操作,我认为这就是您收到这些错误消息的原因。

You have to make sure the right certificate is selected in your build settings. For each configuration profile you have different settings. So if you use "Release" as your AppStore build then you must go to your project settings and set the "Code Sign Identity" to the right developer certificate.

And do the same for the target, I think thats why you got these error messages.

冷清清 2024-09-25 03:55:03

关于错误:
… *.app:对象文件格式无效或不合适

  1. 将“可执行文件”(又名 CFBundleExecutable)Info.plist 设置更改为与产品名称构建设置不同的内容可能会引发此错误。这种情况下的快速解决方法是将“可执行文件”Info.plist 属性恢复为以下值: ${EXECUTABLE_NAME} 。发生这种情况的原因是因为可执行文件名称是由 Xcode 派生的 PRODUCT_NAME、EXECUTABLE_PREFIX 和 EXECUTABLE_SUFFIX 构建设置的值,并且 Xcode 在打包应用程序后验证/坚持此格式。通常(默认情况下)EXECUTABLE_PREFIX 和 EXECUTABLE_SUFFIX 为空,因此可执行文件名称又与产品名称匹配。因此,将“可执行文件”info.plist 设置等于产品名称构建设置的值在技术上是可行的(只要可执行前缀和后缀构建设置保持空白),但将其值恢复为 ${EXECUTABLE_NAME} 是最好的.

  2. 导致此错误的另一个原因是 Xcode 项目上与代码签名相关的生成设置格式错误,或者代码签名设置与推荐设置略有不同。您可以使用以下指南来确保您的项目和钥匙串满足代码签名的所有要求,并特别注意这些数字,以检查您的设置是否完全符合 Apple 推荐的设置。本指南引用了以下推荐部分: “理解和解决代码签名问题问题” 具体请参阅以下部分:
    “验证钥匙串配置”和“验证 Xcode 项目配置”。

如果执行上述操作后错误仍然存​​在,则问题可能是 Xcode 项目特定的问题,而不是您的签名身份的固有问题。因此,我建议使用当前版本的 Xcode 创建一个新的 Xcode 项目,并将现有代码、资源和框架迁移到新项目中,然后查看代码签名错误是否仍然存在。

祝你好运,

Regarding the error:
… *.app: object file format invalid or unsuitable

  1. Changes to the "Executable file" (aka, CFBundleExecutable) Info.plist setting to something different from the Product Name build setting can trip this error. The quick fix in this case is to restore your "Executable file" Info.plist property to the following value: ${EXECUTABLE_NAME} . The reason this occurs is because the executable name is derived by Xcode of the values for the PRODUCT_NAME, EXECUTABLE_PREFIX, and EXECUTABLE_SUFFIX build settings and Xcode validates/insists this format after packing the app. Often times (and by default) the EXECUTABLE_PREFIX and EXECUTABLE_SUFFIX are empty so the executable name in turn matches the Product Name. Therefore setting the "Executable file" info.plist setting equal to the value of the Product Name build setting will technically work (so long as the executable prefix and suffix build settings remain blank), but restoring its value to ${EXECUTABLE_NAME} is best.

  2. Another cause of this error is due to malformed Code Signing related Build Settings on the Xcode Project, or Code Signing settings which vary slightly the recommended settings. You can use the following guide to ensure your Project and Keychain satisfy all the requirements for code signing and take special note of the Figures to check that your settings match what's recommended by Apple exactly. The following recommended sections are referenced from the guide: "Understanding and Resolving Code Signing Issues" Specifically, see the sections:
    "Verify Keychain configuration" and "Verify Xcode Project configuration".

If the error persists after the above, the problem is likely Xcode Project specific versus an inherent problem with your signing Identities. Therefore, I recommend creating a new Xcode Project with your current version of Xcode and migrate your existing code, resources, and frameworks into the new project and see if the code sign error persists.

Good luck,

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文