Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App Submission: Invalid Binary - Invalid Signature

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:

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.

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.

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.

The only thing I can think of is either because I am changing from a Buzztouch app or it is Sprite Kit.

Here is a screenshot of my code signing:

screenshot of code signing

like image 688
PoKoBros Avatar asked Jan 29 '14 00:01

PoKoBros


4 Answers

In Apple developer support there are two additional common causes of the Invalid Signature binary rejection reason,

  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: 

A. Run the app diagnostic here: How do I check if my application's signature has been corrupted?

B. Then check the command line output with: List of Signature Verification Failure Root Causes. Double files are diagnosed with a message like:  

resource missing: my.app/._.*

C. From the docs:

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.

        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)

D. After running dot_clean on your Xcode project, create a new app archive (via Xcode > Product > Archive), reattempt submission.

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. 

like image 79
Bobjt Avatar answered Nov 12 '22 11:11

Bobjt


This is what I did when I encountered a similar problem with the Mac App Store:

  1. Re-generate the app's Distribution and Development certificates (from the Apple Developer's Certificates site).
  2. 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).
  3. Re-fresh the certificates and identities from Xcode.
    1. Open Xcode's Preferences.
    2. Go to Accounts tab.
    3. Clicked my account
    4. Clicked the refresh button.
  4. Generate the archive.
  5. Submit the app and clicked on "refresh signing identities" somewhere mid-way in wizard prompts.

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

Build settings - signing

like image 33
adib Avatar answered Nov 12 '22 10:11

adib


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.

enter image description here

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.

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.

Select correct Provisioning profile. enter image description here

Select correct code sign. enter image description here

4) Cleaned up your project.

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.

see this ref

like image 2
Mani Avatar answered Nov 12 '22 11:11

Mani


  1. Under "Code Signing Identity" Make sure you have selected your Distribution Cert for the "Release" scheme

  2. Under "Provisioning Profile" make sure you select a Distribution provisioning profile (not an Ad Hoc one)

  3. Archive and distribute, make sure the same cert is selected when submitting (after entering your iTunesConnect info)

like image 1
tiltem Avatar answered Nov 12 '22 10:11

tiltem