Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS app submission : invalid signature

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:

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.

so here is what I'm doing:

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

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

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

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

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

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

EDIT ( Solution )

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.

like image 675
zerzer Avatar asked Sep 01 '14 11:09

zerzer


3 Answers

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.

enter image description here

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

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

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

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

enter image description here

then,clean your project and generate the archive.

like image 109
gunas Avatar answered Oct 23 '22 20:10

gunas


I had the same issue because the application archive contained files with non-ASCII characters. I renamed all of them and then it worked.

You can find all files with non-ASCII characters by executing the following command in the terminal from the archive folder path:

LC_ALL=C find . -name '*[! -~]*'

like image 6
Jleuleu Avatar answered Oct 23 '22 20:10

Jleuleu


Build Settings-> Build Options: Enable Bitcode = Yes helped for me. I could see the error still, but waiting a little Xcode passed it, and continued to upload the application.

enter image description here

like image 2
πter Avatar answered Oct 23 '22 19:10

πter