Search code examples
iosxcodeapp-storeupdatescode-signing

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


Solution

  • 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