Upload to iTunes connect fails

Hi. iTunes Connect rejects my ipa, saying that it has invalid signature. I then receive following email from Apple:

Invalid Signature - The binary with bundle identifier ‘com.MyID.MyGame’ at path [MyGame.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. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). 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.

I know there are several similar issues like this, e.g.:

One suggested fix would be to sign the .ipa on Mac. Unfortunately, I didn’t manage to do so. I packaged the game on PC using Wildcard provision, copied it to Mac and then did what first answer suggested in this post:

But running

/usr/bin/codesign -f -s “$CERTIFICATE” Payload/*.app

results in error: “main executable failed strict validation”

What could I be doing wrong?
Thanks a lot for your help :slight_smile:

Hi Nikolay,

I asked Peter Sauerbrei about why what you are doing might not be working and he replied that:

In theory that stack overflow should work if you set everything up correctly. However, the safest way to do this is to move the entire project over to the Mac and build it from the editor as normal.

Please try this and let us know your results.

Thanks,

.

I don’t believe you can use a wild card certificate when uploading to test flight or app store. An old post, but could be helpful info for anyone looking at this in the future :slight_smile:

Try using a distribution certificate.