xcode iTunes Connect 上的无效签名(无效二进制)

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

Invalid Signature (Invalid Binary) on iTunes Connect

iosxcodeapp-store-connectcode-signing

提问by BlackSheep

I know is a duplicate question, but on all other questions i cant find a solution, so i retry to post question with more details.

我知道这是一个重复的问题,但在所有其他问题上我都找不到解决方案,所以我重新尝试发布更详细的问题。

I archive my app on xcode5for iOS7with Release Schemeand correct Provisioning Distribution

我存档我的应用程序上xcode5iOS7Release Scheme正确Provisioning Distribution

that's the screen:

这是屏幕:

This is on Project

这是在 Project

enter image description here

在此处输入图片说明

And This is on Target

这是在 Target

enter image description hereenter image description here

在此处输入图片说明在此处输入图片说明

I try to do many different asset, i'am sure to my Building Archiveis on Releasebut the answer of iTunesConnectis every time the same:

我尝试做许多不同的资产,我确信我Building Archive是在,ReleaseiTunesConnect每次的答案都是一样的:

Dear developer,

We have discovered one or more issues with your recent delivery for "MyApp". To process your delivery, the following issues must be corrected:

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.

Regards,

The App Store team

亲爱的开发者,

我们发现您最近为“MyApp”交付的一个或多个问题。要处理您的交货,必须更正以下问题:

无效签名 - 确保您已使用分发证书而不是临时证书或开发证书对您的应用程序进行签名。验证 Xcode 中的代码签名设置在目标级别(覆盖项目级别的任何值)是否正确。此外,请确保您上传的包是使用 Xcode 中的 Release 目标构建的,而不是 Simulator 目标。如果您确定代码签名设置正确,请在 Xcode 中选择“Clean All”,删除 Finder 中的“build”目录,然后重建您的发布目标。

更正这些问题后,请转到“版本详细信息”页面并单击“准备上传二进制文件”。继续提交过程,直到应用程序状态为“等待上传”。然后,您可以交付更正后的二进制文件。

问候,

应用商店团队

And Invalid Binary

Invalid Binary

I become to crazy to understand how to sole this issue, any body have idea to do this?

我变得疯狂地理解如何解决这个问题,任何人都知道这样做吗?

Thanks.

谢谢。

****Test Response****

****测试响应****

enter image description here

在此处输入图片说明

Athority Screenis correct

Athority 屏幕是正确的

enter image description here

在此处输入图片说明

采纳答案by tsafrir

In Xcode, at the target level do the following:

在 Xcode 中,在目标级别执行以下操作:

  1. First choose the provisioning profile for the Release configuration. (For Any SDK) The provisioning profile mustmatch the app's Bundle ID(As you can see in the General tab).
  2. In the code signing identity, tap on the sub-menu for Any iOS SDKand make sure you choose Automatic. If you can't see below.
  3. Clean Alland Archive.
  1. 首先为发布配置选择配置文件。(对于Any SDK)配置文件必须与应用程序匹配Bundle ID(如您在“常规”选项卡中看到的那样)。
  2. 在代码签名标识中,点击子菜单Any iOS SDK并确保选择Automatic。如果你看不到下面。
  3. 全部清理存档

Choosing CodeSign identity:

选择 CodeSign 身份:

In step 2, if you can't choose Automatic, then it means you might not have a match between the AppID and the app's Bundle ID. The AppID is pointed by the provisioning profile you chose.

在第 2 步中,如果您不能选择Automatic,则表示您的 AppID 和应用程序的 Bundle ID 之间可能不匹配。AppID 由您选择的配置文件指向。

If this is the case, then login in the developer portal and make sure that the provisioning profile you used points to the correct AppID.

如果是这种情况,请登录开发人员门户并确保您使用的配置文件指向正确的 AppID。

To verify the the .ipa or .app before you submit try these commands. Then look at the printout, and see if all looks right. Also verify the expiration date.

要在提交之前验证 .ipa 或 .app,请尝试这些命令。然后查看打印输出,看看是否一切正常。还要验证到期日期。

$cd <where the app is>
$unzip *.ipa
$cd Payload
$codesign -d --entitlement - *.app
$codesign --verify -dvvv *.app
$security cms -D -i *.app/embedded.mobileprovision

回答by Bobjt

In Apple developer support, I've seen two additional common causes of the Invalid Signaturebinary rejection reason,

在 Apple 开发人员支持中,我看到了Invalid Signature二进制拒绝原因的另外两个常见原因,

  1. 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.

  2. 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:?

  1. 包含特殊字符(即非数字和非字母)的可执行文件。要解决此问题,请将 Xcode 目标的产品名称构建设置从“${TARGET_NAME}”更改为仅包含字母/数字字符的字符串。让我知道这是否是问题(以及有问题的字符)的原因,因为我提交了错误报告以修复我在此处找到的每个实例。

  2. 将未压缩的 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_cleanon 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 Hardik Mamtora

Now it must be include following architecture.

现在它必须包含以下架构。

armv7 armv7s arm64 i386 x86_64

armv7 armv7s arm64 i386 x86_64

Try this.

尝试这个。