Invalid signature when uploading to App Store

hey guys i know this is a little off topic but i tried posting on stack overflow and apple devforums with no answer. I’m struggling with this issue for 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 run 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

1 Like

I am getting the same issue.

You earned your application from XCODE? There probably tell a more specific error. You check your account certificates and keys for updated? Xcode -> Preferences

That is the most frustrating part, I don’t receive any errors within XCode. Even when I create an archive and then validate it, XCode tells me that the build is valid and is ready to be sent to the store for approval.

Where the problem occurs is when you proceed to upload the app to the store, iTunes Connect rejects it saying that it is an “Invalid Binary” due to: "Invalid Signature - A sealed resource is missing or invalid. The binary at path [app.app/app] contains an invalid signature. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate.

Hello , I’ve solved my issue after a month of searching arround the internet. this is crazy but turned out having a special character in the appName ( for me it was ’ ? ’ ) caused this non-sens error . I hope it’s the same for you, so you just need to update the appName

I had a similar issue. Removing all shell scripts (.sh files) from the bower lib folder solved it for me.

For example, moment.js has a shell script in it’s source code and xcode requires it to be signed. I simply removed that file and the upload started working.

More info here: http://stackoverflow.com/questions/29788601/error-itms-90035-xcode

3 Likes

Yep that did it. I had a “?” in my app title as well. As soon as I removed it from the config.xml file, that fixed the issue.

I had the exact file in my moment directory causing me issues. Spend a couple hours on this!!! Thanks a bunch.

As cpk I resolved such kind of issue by not using bower to install the full moment.js files but downloaded only the moment.min.js file.

1 Like

There was a random file in my lib/moment/scripts directory called npm_prepublish.sh

Removing that directory fixed my issue. Thanks for the response.

1 Like

More recently, the error returned in Xcode is code “ERROR ITMS-90035”, at least when this is caused by the unsigned shell script issue.

Just wanted to add that here to help others when searching this forum using that error code.

1 Like