xcode 应用提交:无效二进制 - 无效签名
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21420041/
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
App Submission: Invalid Binary - Invalid Signature
提问by PoKoBros
I am trying to submit an update to the iOS app store. I am going from a Buzztouch app to a Sprite Kit app. I am able to archive the Xcode project and submit it. The app gets to the status of Upload Received but than about a minute later, it changes to Invalid Binary and I get an email saying:
我正在尝试向 iOS 应用商店提交更新。我将从 Buzztouch 应用程序转变为 Sprite Kit 应用程序。我能够归档 Xcode 项目并提交它。该应用程序进入 Upload Received 状态,但大约一分钟后,它更改为 Invalid Binary,我收到一封电子邮件,内容如下:
Invalid Signature - Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose "Clean All" in Xcode, delete the "build" directory in the Finder, and rebuild your release target.
Once these issues have been corrected, go to the Version Details page and click "Ready to Upload Binary." Continue through the submission process until the app status is "Waiting for Upload." You can then deliver the corrected binary.
无效签名 - 确保您已使用分发证书而不是临时证书或开发证书对您的应用程序进行签名。验证 Xcode 中的代码签名设置在目标级别(覆盖项目级别的任何值)是否正确。此外,请确保您上传的包是使用 Xcode 中的 Release 目标构建的,而不是 Simulator 目标。如果您确定您的代码签名设置正确,请在 Xcode 中选择“全部清除”,删除 Finder 中的“build”目录,然后重建您的发布目标。
更正这些问题后,请转到“版本详细信息”页面并单击“准备上传二进制文件”。继续提交过程,直到应用程序状态为“等待上传”。然后,您可以交付更正后的二进制文件。
I have cleaned out the build directory, rebuilt my release target, and made new provisioning profiles multiple times. All of the Code Signing Identities are set to iOS Developer. Code signing and the provisioning profiles have always been a little bit confusing to me, I could have made some obvious mistakes.
我已经清理了构建目录,重建了我的发布目标,并多次创建了新的配置文件。所有代码签名身份都设置为 iOS Developer。代码签名和配置文件一直让我有点困惑,我可能犯了一些明显的错误。
I have tried submitting over 50 times! I find this very frustrating because I have emailed Apple and they got back to me but it was just a link to the dev center with code signing information. I have also spent lots of time searching the Internet to find a solution to this and there hasn't been a good solution that actually works for this problem.
我已经尝试提交超过 50 次了!我觉得这很令人沮丧,因为我已经给 Apple 发了电子邮件,他们回复了我,但这只是一个带有代码签名信息的开发中心的链接。我也花了很多时间在互联网上搜索以找到解决方案,但还没有一个很好的解决方案可以真正解决这个问题。
The only thing I can think of is either because I am changing from a Buzztouchapp or it is Sprite Kit.
我唯一能想到的要么是因为我是从Buzztouch应用程序更改的,要么是 Sprite Kit。
Here is a screenshot of my code signing:
这是我的代码签名的屏幕截图:
采纳答案by adib
This is what I did when I encountered a similar problem with the Mac App Store:
这是我在 Mac App Store 遇到类似问题时所做的:
- Re-generate the app's Distribution and Development certificates (from the Apple Developer's Certificates site).
- Download both certificates and drag them to Xcode's icon (not sure whether it had any impact, but after so many submission failures, I was pretty superstitious).
- Re-fresh the certificates and identities from Xcode.
- Open Xcode's Preferences.
- Go to Accounts tab.
- Clicked my account
- Clicked the refresh button.
- Generate the archive.
- Submit the app and clicked on "refresh signing identities" somewhere mid-way in wizard prompts.
- 重新生成应用程序的分发和开发证书(来自 Apple Developer's Certificates 站点)。
- 把两个证书都下载下来,拖到Xcode的图标上(不知道有没有影响,但是提交了这么多次失败,我很迷信)。
- 从 Xcode 重新刷新证书和身份。
- 打开 Xcode 的首选项。
- 转到帐户选项卡。
- 点击我的账户
- 单击刷新按钮。
- 生成存档。
- 提交应用程序并在向导提示的中间位置单击“刷新签名身份”。
As a reference, here is my built settings related to signing. That one worked the last time I submitted the app (which has been in the "waiting for review" state for the past two days now, so I guess it passed all of their automated tests).
作为参考,这是我构建的与签名相关的设置。我上次提交该应用程序时,该应用程序有效(过去两天一直处于“等待审核”状态,所以我猜它通过了他们所有的自动化测试)。
回答by Mani
Your issue relate with signing failed because of your app didn't sign with recent distribution certificate. Check the following steps:
您的问题与签名失败有关,因为您的应用没有使用最近的分发证书签名。检查以下步骤:
1) Check your bundle identifier
to list out provisioning profile as like below picture. Because It also lead to this problem.
1) 检查您bundle identifier
列出的配置文件如下图所示。因为它也会导致这个问题。
2)You may not using the correct certificates
when building your app. Just Delete your certificates in Provisioning Portal and create new ones and update them in Xcode.
2) 您correct certificates
在构建应用程序时可能未使用。只需在 Provisioning Portal 中删除您的证书并创建新证书并在 Xcode 中更新它们。
3) From your picture, you didn't selected correct provisioning profile. Goto Organizer / Provisioning Profiles / Refresh and allow Xcode to fetch the latest ones. see screen shot to how to do that.
3) 从您的图片来看,您没有选择正确的配置文件。转到 Organizer / Provisioning Profiles / Refresh 并允许 Xcode 获取最新的。请参阅屏幕截图以了解如何执行此操作。
Select correct Provisioning profile.
选择正确的配置文件。
Select correct code sign.
选择正确的代码符号。
4) Cleaned up your project.
4)清理你的项目。
5) Just clean all your targets
. You can even go to /Users/%USERNAME%/Library/Developer/Xcode/DerivedData
and delete all of the directories in there.
5) 刚刚clean all your targets
。您甚至可以转到/Users/%USERNAME%/Library/Developer/Xcode/DerivedData
并删除其中的所有目录。
回答by Bobjt
In Apple developer support there are two additional common causes of the Invalid Signature
binary rejection reason,
在 Apple 开发人员支持中,Invalid Signature
二进制拒绝原因有两个额外的常见原因,
executable files containing special characters (i.e. non-numeric, and non-alpha). To resolve this issue, change the Xcode target's Product Name build setting from “${TARGET_NAME} to a string containing only alpha/numeric characters. Let me know if this was the cause of the issue (and the problematic characters) because I file bug reports to fix each instance I find here.
Apple Double Files ("double files") that result from copying the Xcode project uncompressed to/from a non HFS+ formatted hard drive. To check if this caused your rejection:?
包含特殊字符(即非数字和非字母)的可执行文件。要解决此问题,请将 Xcode 目标的产品名称构建设置从“${TARGET_NAME}”更改为仅包含字母/数字字符的字符串。让我知道这是否是问题(以及有问题的字符)的原因,因为我提交了错误报告以修复我在此处找到的每个实例。
将未压缩的 Xcode 项目复制到非 HFS+ 格式的硬盘驱动器或从非 HFS+ 格式的硬盘驱动器复制的 Apple 双文件(“双文件”)。检查这是否导致您的拒绝:?
A. Run the app diagnostic here:?How do I check if my application's signature has been corrupted?
A. 在此处运行应用程序诊断:? 如何检查我的应用程序的签名是否已损坏?
B. Then check the command line output with:?List of Signature Verification Failure Root Causes. Double files are diagnosed with a message like:??
B. 然后检查命令行输出:?签名验证失败根本原因列表。双文件被诊断为如下消息:??
resource missing: my.app/._.*
C. From the docs:
C. 从文档:
The file prefixed with "._" is considered an AppleDouble file and it can result from copying the uncompressed Xcode project folder onto a non-HFS+ formatted disk. The AppleDouble files must be removed using the 'dot_clean' command. The Xcode project folder is the argument to dot_clean as illustrated below. Note:?You can drag your Xcode project folder from Finder into the Terminal window to automatically fill its path into the command.
以“._”为前缀的文件被视为 AppleDouble 文件,它可能是由于将未压缩的 Xcode 项目文件夹复制到非 HFS+ 格式的磁盘上而产生的。必须使用“dot_clean”命令删除 AppleDouble 文件。Xcode 项目文件夹是 dot_clean 的参数,如下图所示。注意:?您可以将 Xcode 项目文件夹从 Finder 拖到终端窗口中,以自动将其路径填充到命令中。
dot_clean /path/to/My_Xcode_Project
(If Terminal can't find the dot_clean utility, download the optional Command Line Tools through Xcode > Preferences > Downloads)
(如果终端找不到 dot_clean 实用程序,请通过 Xcode > Preferences > Downloads 下载可选的命令行工具)
D. After running dot_clean
on your Xcode project, create a new app archive (via Xcode > Product > Archive), reattempt submission.
D. 在dot_clean
您的 Xcode 项目上运行后,创建一个新的应用程序存档(通过 Xcode > Product > Archive),重新尝试提交。
To prevent double files be sure to compress the Xcode project folder to .zip using Finder before transferring it to/from a non HFS+ formatted hard drive.?
为防止重复文件,请确保在将 Xcode 项目文件夹传输到非 HFS+ 格式的硬盘驱动器之前,使用 Finder 将其压缩为 .zip。?
回答by tiltem
Under "Code Signing Identity" Make sure you have selected your Distribution Cert for the "Release" scheme
Under "Provisioning Profile" make sure you select a Distribution provisioning profile (not an Ad Hoc one)
Archive and distribute, make sure the same cert is selected when submitting (after entering your iTunesConnect info)
在“代码签名身份”下确保您已为“发布”方案选择了分发证书
在“配置文件”下,确保您选择分发配置文件(不是 Ad Hoc 配置文件)
存档和分发,确保在提交时选择相同的证书(输入您的 iTunesConnect 信息后)
回答by AppHandwerker
After doing all of the above
完成以上所有操作后
Menu Bar try Product->Archive
菜单栏尝试产品->存档
Then from the organise try resigning and submitting.
然后从组织尝试辞职和提交。
Window->Organiser Select archive and then press distribute (but i'm pretty sure you'll know how that works)
Window->Organiser 选择存档,然后按分发(但我很确定你会知道它是如何工作的)
Obviously if you can't do this then chances are you have indeed got something wrong with your signing certificates, more specifically your bundle identifier is likely to be the culprit.
显然,如果您不能这样做,那么您的签名证书可能确实有问题,更具体地说,您的包标识符可能是罪魁祸首。
One other option is your app uses services that you haven't set up on developer.apple.com/ios for the app id such as game centre, push notification etc. Good luck
另一种选择是您的应用程序使用您尚未在 developer.apple.com/ios 上为应用程序 ID 设置的服务,例如游戏中心、推送通知等。祝您好运
回答by user3269480
check your launch images . Are they conflicting like 2 images have got same name. Because i have got the similar issue which i solved like this within 10 minutes.
检查您的启动图像。它们是否有冲突,例如 2 个图像具有相同的名称。因为我遇到了类似的问题,我在 10 分钟内解决了这个问题。
回答by PoKoBros
To figure out this problem I just created a new Xcode project and copied and pasted everything into the new project.
为了解决这个问题,我刚刚创建了一个新的 Xcode 项目并将所有内容复制并粘贴到新项目中。
回答by Andrea Leganza
In my case the problem was to not ASCII chars in filename (someone did sent us to embed), solution was to do a global search in project:
在我的情况下,问题是文件名中没有 ASCII 字符(有人确实让我们嵌入),解决方案是在项目中进行全局搜索:
ls -1 -R -i | grep -a "[^A-Za-z0-9_.':@ /-]"
ls -1 -R -i | grep -a "[^A-Za-z0-9_.':@ /-]"
And delete those chars from filenames.
并从文件名中删除这些字符。