Invalid Signature Error when I update in app store

Hello,

I uploaded the first version of my app to app store, then I tried to update my app to next version. When I choose my app file in "Upload Application" screen, I got error about invalid signature as below.

+The binary you uploaded was invalid. The signature was invalid, or it was not signed with an Apple submission certificate.+

Strange thing is I used exact same project configuration and machine when I uploaded the first one, but it will throw the error when I select the file.

I tried these things:
1. Create a new app id and provision file, and select the new provision file in target->Code Signing section
2. Changing Bundle Version Number in .pinfo file.

I'm trying some solutions people discussed here
http://discussions.apple.com/thread.jspa?messageID=7469931&#7469931

but I still get the same error message. Does anyone have advice for me?

iPhone

Posted on Jul 9, 2008 7:59 AM

Reply
Question marked as Top-ranking reply

Posted on Jul 13, 2008 6:53 AM

I had the exact same problem and tried your potential solutions and many others. After a few hours and a night of thinking I stumbled upon something that worked.

My initial application was submitted prior to the final release of the iPhone 2.0 OS. Like you found, subsequent attempts to submit an updated application using the same distribution settings resulted in the error you described. After re-reading Apple's distribution documentation I noticed a new emphasis on wild-carded APP IDs. This emphasis did not exist when I first submitted my application so I did not use a wild-carded APP ID. So, I created a new APP ID with nothing more than an asterisk for the bundle identifier. I then created a new distribution provisioning profile for this APP ID and used it to sign my updated application and it worked! The upload was then accepted through iTunesConnect.

A few things to note:
1. Although you change the bundle identifier of your APP ID, you probably do not want to change the bundle identifier in your application's plist file. Although I don't know for sure, I'm guessing that it may be interpreted as a different application if the plist's bundle identifier changes.
2. When I say it worked I'm only referring to getting the binary upload to succeed. My application is still in review so I can't promise that something else won't crop up.
3. I am certainly no authority on this subject. Hopefully what has worked for me will work for you too.

As reference, you may be interested in reading pages 17 and 37 (assuming the document isn't updated) of the iPhone Developer Program User Guide. They talk a little bit about the wild-carded APP IDs.
53 replies
Question marked as Top-ranking reply

Jul 13, 2008 6:53 AM in response to kiichi

I had the exact same problem and tried your potential solutions and many others. After a few hours and a night of thinking I stumbled upon something that worked.

My initial application was submitted prior to the final release of the iPhone 2.0 OS. Like you found, subsequent attempts to submit an updated application using the same distribution settings resulted in the error you described. After re-reading Apple's distribution documentation I noticed a new emphasis on wild-carded APP IDs. This emphasis did not exist when I first submitted my application so I did not use a wild-carded APP ID. So, I created a new APP ID with nothing more than an asterisk for the bundle identifier. I then created a new distribution provisioning profile for this APP ID and used it to sign my updated application and it worked! The upload was then accepted through iTunesConnect.

A few things to note:
1. Although you change the bundle identifier of your APP ID, you probably do not want to change the bundle identifier in your application's plist file. Although I don't know for sure, I'm guessing that it may be interpreted as a different application if the plist's bundle identifier changes.
2. When I say it worked I'm only referring to getting the binary upload to succeed. My application is still in review so I can't promise that something else won't crop up.
3. I am certainly no authority on this subject. Hopefully what has worked for me will work for you too.

As reference, you may be interested in reading pages 17 and 37 (assuming the document isn't updated) of the iPhone Developer Program User Guide. They talk a little bit about the wild-carded APP IDs.

Jul 14, 2008 9:53 AM in response to kunklejr

Thanks!

"Wild card for distribution" method works and it's "in review" status now! (It took 10 minutes to change the status after uploading via Application Loader)

As kunklejr mentioned, we are not sure this is right way, but as far as I see the latest version of the instructions at program portal, it says:

Prepare App -> 2.5

Select your wildcard App ID to build all of your applications with your single Distribution Provisioning Profile.

OK... I thought that I have to make my app id really unique, so I put like com.companyname.appname but now it's just an asterisk.

Anyway, my application got in the next stage, and my ticket is still open, so I'll update status once it's approved / rejected.

Let me flag this thread as "Answered" if it's approved.

Thanks again!

Jul 26, 2008 8:17 PM in response to kiichi

http://forums.macrumors.com/archive/index.php/t-518011.html

gralem said it best and fixed my issue when I had to update my application:

VERY IMPORTANT: When building your app for the App Store, it can be very easy to forget to Set Active SDK->Device. If Active SDK is left on Simulator, you cannot upload the resulting application to the store. When you want to upload to the App Store, set SDK to DEVICE!

After that, I was able to re-sign my application, compile it, and upload it without a hitch to the App Store as an update. Thanks everyone!

Aug 27, 2008 10:27 PM in response to tsayman

I finally got my app uploaded, but it took 2 days of hackin' & slashin' 😟

Not counting the aggro I had to get the app store distribution cert selected (Common Name confusion), I reached the point where the upload failed with complaints about my bundle identifier.

I fixed those by making sure there were NO underscores, spaces or dashes in my product name, nor in the bundle identifier itself, nor in the directory path to the .app package file.

So, that got me to the same point as the OP: a failure to upload my zip file with an error message complaining my app wasn't signed with an Apple submission certificate (emphasis on submission lol... never mind).

I did a 'Show Package Contents' on the .app file, and sure as boots it was missing the embedded.mobileprovision file which is where the digital signatures are kept! What gives?

Doing a Clean and Build THREE times in succession (with no tinkering in between - honest!) finally produced a digitally signed package. It seems almost arbitrary and inexplicable.

Anyway, compressing that last .app package finally uploaded happily, but man... what a process!

Jan 12, 2009 8:25 AM in response to s.narut

Hi all,

I got the same error and overcame by this:
1. Ensure the provisioning profile is embedded into the .app package. This can be done by showing package contents and check for the embedded.mobileprovision file.

2. Someone has trouble with the bundle identifier (like me) can check this:
- Note that the com.yourcompany.{PRODUCT_NAME} will not work.
- The bundle identifier must be similar to the App ID on the Program Portal.
So what I do is go to the Program Portal, copy my App ID, something like BLAHBLAH123.com.mycompany.something. Just remove BLAHBLAH123 prefix and paste the remaining to the bundle identifier. Please note that the App ID (without prefix) must be exactly pasted to bundle identifier (with every fullstop, underscore, EXACTLY). Then it works. This is what I've been doing.

Hope this helps. 🙂

Feb 6, 2009 6:19 PM in response to kiichi

Thank You, Thank You, Thank You. Kiicchi, you have saved me another night of pulling my hair out, and cursing my machine. I just changed my distributor provision to one which uses a wildcard appID, while leaving the Bundle Identifier (in info.plist and the General settings tab in the Targets file) as an explicit value. To Clarify: I used a provision with the appID com.CompanyName.* and a Bundle Identifier of com.CompanyName.AppName - and viola! upload success. Not sure how it will work out upon hitting the review board, but will leave updates

Aug 14, 2009 1:07 AM in response to gebitu

Just for the record and for other people. I was having the same issue while working on two apps in the same xcode project (lite & premium). I already had my lite app on the store. When I built it and uploaded it, it got rejected with the same message. Even stranger, when I compressed the app folder, it would sometime create 8KB zip files instead of hundreds of kB.
My bundle id hadn't changed, and the mobile provisioning thing was correct. Codesign was giving me the Go

Here is what worked for me
- clean lite target
- close all finder windows
- close xcode
- open xcode
- build lite target for device & distribution profile
- open finder and go to build directory
- compress folder
- upload -> it worked
- clean premium target
- close all finder windows
- close xcode
- open xcode
- build premium target for device & distribution profile
- open finder and go to build directory
- compress folder
- upload -> it worked

Failing to close the finder windows or xcode gave the same error messages.

Hope this helps someone as much as the previous messages helped me!

Oct 26, 2009 12:11 PM in response to kiichi

I had the same problem and fixed it by copying my application directory from a network drive to the desktop (and rebuilding in xcode).

I only happened to find this solution through trial and error, it was not in the documentation and this error message is not very descriptive. It would be nice if Apple were to mention that the files have to be on the local machine (or perhaps just not on a Windows server).

Feb 28, 2010 4:56 AM in response to kiichi

I wanted to say that this thread really helped me out. For me, I had an ad hoc distribution profile and had to create a new App store one to attach onto my signing certificate. After downloading that and importing the new distribution certificate (it's a .cer file), I had to make sure the signing identities for both the project and the target were set to the new profile.

It helps to name the app store profile something recognizable.. like APP STORE DISTRIBUTION.

Also, I don't know if it made a difference or not, but close all my finder windows, cleaning, restarting xcode, and then building seemed to help.

Jul 11, 2008 5:43 PM in response to LaytonDuncan

In respose to
+The binary you uploaded was invalid. The signature was invalid, or it was not signed with an Apple submission certificate.+

The problem I had was white space. My program was in a directory that was named "MyExample - Example" and this was the app name as well. After changing both of these to not contain any white space ("MyExample-Example"), I was able to upload my app.

Hope this helps someone.

Jul 11, 2008 7:13 PM in response to kiichi

I'm not sure if this is your problem, but hopefully it helps someone:
I had a problem with invalid binary with one of my apps, even though I had done what it said. In the config part (where you change iPhone Developer to iPhone Distribution), I right clicked and selected "Show Definitions". This revealed that even though I had changed it in one mode, the change to "iPhone Distribution" had not taken hold in this other mode...I edited the value in this mode, and it worked.

Nov 20, 2008 3:59 AM in response to hard_wurker

Guess you need to explicitly specify you Bundle Identifier (ie. com.exambusters.Algebra1).

Me too, have some problem with uploading app to iTunesConnect. But I've managed to figure all the problems out with a lot of help from this thread. So, this is my contribution back. ;D

- After built your app, always check the build result. If no mobileprovision file part showing, clear all build target and re-build again.
- Immediately zip your .app file after build. DO NOT USE THE "SHOW PACKAGE CONTENTS" menu in finder. It will break the codesigning.
- No space, under scroll or other special characters in Bundle Identifier. Stick with letters and numbers.

Hope this help someone.
Cheers

Message was edited by: s.narut

Mar 15, 2009 6:00 PM in response to Flagship8787

If you are like me and had the wrong Bundle Identifier in your first version back before they checked... don't fret, the old one will still work.
If you are still getting this error, right click on MyApp.app and select Show Package Contents. Most likely you will be missing the file embedded.mobileprovision even though the log file clearly shows it being written. The fix is simple... Close XCode, delete MyApp.App, launch XCode and build. The file embedded.mobileprovision gets generated and everything is fine again.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Invalid Signature Error when I update in app store

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.