iOS应用提交:签名无效

iOS应用提交:签名无效

问题描述:

我在这个问题上苦苦挣扎了一个多星期,我已经尝试过在Google上能找到的所有方法,但都没有运气.这是我第一次尝试将应用提交到App Store,但是每次尝试后,我都会不断收到此电子邮件:

I'm struggling with this issue for more than a week now, I've tried all I could find on Google with no luck. This is my first time trying to submit an app to the App Store, but I keep getting this email after each try:

无效签名-确保您已使用 发行证书,而不是临时证书或开发证书 证书.验证Xcode中的代码签名设置是否为 在目标级别更正(将覆盖项目中的所有值) 等级).此外,请确保已构建要上传的捆绑软件 使用Xcode中的Release目标而不是Simulator目标.如果你是 确定您的代码签名设置正确无误,请在 Xcode,删除Finder中的"build"目录,然后重新构建您的 释放目标.

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.

这就是我在做什么:

  • 我的登录证书中有我的发行证书,其中 私钥和公钥.
  • 我具有与我之前创建的证书相同的发行配置文件.
  • 我的配置文件上的捆绑软件ID在iTunes Connect应用程序上是相同的,并且 在Xcode常规设置中相同.
  • iTunes connect app和Xcode中具有相同版本(0.8.2).
  • 我正在选择的设备而不是模拟器进行构建(但是我没有将设备连接至Mac).
  • 构建设置下的代码签名部分(针对目标和项目).
  • 对于所有内容,我都有"iPhone Distribution:...",而且我正在选择分发设置配置文件.
  • I have my distribution certificate in login keychain , with the private and public key .
  • I have the distribution provisioning profile with the same certificate i've created earlier .
  • The bundle ID on my provisioning profile is the same on my iTunes connect app and the same in Xcode general settings .
  • The same version (0.8.2) in iTunes connect app and Xcode .
  • I'm building with device selected not a simulator (but i don't have a device connected to the mac).
  • the code signing part under build settings (for both target and project).
  • I have "iPhone Distribution : ... " for everything and also i'm selecting the distribution provisioning profile .

我缺少什么?我四处张望,发现的所有人都是版本不正确或捆绑包ID错误的人.

What I am missing? I've looked all over and all I find is people with incorrect versions or incorrect bundle id.

我正在使用Cordova和Ionic来构建我的应用程序,我不知道这是否与它有关.

I am using Cordova and Ionic to build my app, I don't know if that has something to do with it.

我已经看到了有关此问题的Apple故障排除指南,并运行了以下命令:

I've seen the troubleshoot guide of Apple on this issue and ran this command:

codesign --verify -vvvv -R ='anchor苹果通用和证书 1 [field.1.2.840.113635.100.6.2.1]存在并且(证书 leaf [field.1.2.840.113635.100.6.1.2]存在或证书 leaf [field.1.2.840.113635.100.6.1.4]存在)'/path/to/the.app

codesign --verify -vvvv -R='anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.1] exists and (certificate leaf[field.1.2.840.113635.100.6.1.2] exists or certificate leaf[field.1.2.840.113635.100.6.1.4] exists)' /path/to/the.app

我得到:a sealed resource is missing or invalid file modified: /path/to/MyApp.app/MyApp 他们建议运行此命令以解决问题:dot_clean path/to/xcodeproject

I get : a sealed resource is missing or invalid file modified: /path/to/MyApp.app/MyApp they suggest to run this to resolve the issue: dot_clean path/to/xcodeproject

但这没有帮助,我不断收到相同的错误. 请帮忙,我一无所知

But that didn't help, I keep getting the same error. Please help, I'm out of clues

编辑(解决方案)

Apple只是一家大愚蠢的公司,任何职位下提出的建议解决方案都没有对我有帮助!那只是苹果的愚蠢过程,我有一个无效的字符?"应该已经从应用名称"中删除了.我希望Xcode能够先进行名称验证,然后再进行任何提交和测试过程.

Apple is just a big stupid company, none of the suggested solutions under any of the posts helped me ! it was just the stupid process of apple , I had an invalid character "?" that should have been removed from the App Name. I wish Xcode coulde validate the name first before going into any of the submitting and testing process.

我认为您使用的分发配置文件不正确.请在iTunes连接中创建新的分发配置文件,以进行应用商店提交,而不是临时提交.见下图.

I think you are not using the proper distribution profile.Create a new distribution profile in itunes connect for app store submission not the ad hoc one. see the below image.

1)然后,检查您的捆绑软件标识符,该标识符应与新创建的应用商店证书完全匹配.

1)Then, check your bundle identifier that should exactly match with the newly created appstore certificate.

2)只需在Provisioning Portal中删除证书,然后在Xcode中更新新证书即可.

2)Just Delete your certificates in Provisioning Portal and update the new certificate in Xcode.

3)转到组织者"/供应配置文件"/刷新",并允许Xcode提取最新的.

3)Goto Organizer / Provisioning Profiles / Refresh and allow Xcode to fetch the latest ones.

4)然后转到项目目标->生成设置->生成选项->验证产品,然后将发布模式更改为是".参见下图.

4)then go to project target->build settings->build options->validate product and change your release mode to yes. see the image below.

然后清理您的项目并生成存档.

then,clean your project and generate the archive.