Invalid Signature - Itunes Connect - ios

I always get an email from apple about an Invalid Signature when I try to upload my archive. I tried using automatic signing first, changed it to manual then. Deleted all old certificates, cleaned the project, recreated certificates + profiles from developer portal. Still no success.
I did the code signing settings on the target level as well as the project level. I also have no special character in the Product Name.
I also checked the output of the codesign/security commands like it's described in this answer
Does anyone have an idea what else to try? I also contacted the apple support yesterday and I am waiting for an answer.
The email content:
Dear developer,
We have discovered one or more issues with your recent delivery for "Bier brauen Bier Rezepte". To process your delivery, the following issues must be corrected:
Invalid Signature - A sealed resource is missing or invalid. The file at path [Bier brauen Bier Rezepte.app/Bier brauen Bier Rezepte] is not properly signed. 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. For more information, please consult https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html
Once these issues have been corrected, you can then redeliver the corrected binary.

I will add my 2 cents here, I had the same problem a few days ago, and the reason was that I had in my assets a file with an accentuated character "é" in one of my assets files causing the binary check to fail.
Once removed the invalid signature error was gone, and the binary was validated by apple.
More info: Avoid special characters in Executable names

After a lot of debugging I just created a new ionic project via cli and copied my src folder into it. So some configuration was messed up. Can't tell which one.

Try to verify your app and display names again (it should be same) and make "Signing" again.
I found this info in this blogpost.

Related

iOS: failed publishing on iTunes Connect because of invalid signing

I've received this mail in reply from iTunes Connect:
Invalid Signature - A sealed resource is missing or invalid. The file at path [iCom Club.app/iCom Club] is not properly signed. 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. For more information, please consult https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html
What have I done? I created a new certificate from scratch through the Apple Developer website, destroyed the old one, removed all references and private keys from my MAC of the old distribution certificate and added the new one.
On Xcode, I've checked if all references to the developer account and certificates are correct (they are), I've clean the project, I've destroyed completely the "build" folder inside "DerivedData" folder of Xcode...
But the problem still remains and I've finished the available solutions.
Xcode Version 9.0.1 (9A1004)
I have had this issue all day with a target app within a workspace - checked all references, added a new certificate, created a new target, etc...
I discovered that the issue was the file names used in my media files. If any of your files (media or code) have names with non alphanumerical characters you will also get this error.
In my case, my media files had special accent characters in the file names. Once I removed those, I was able to upload the files.

Why does one .o file in my project has no Provisioning Profile?

Im trying to submit a version of my app and after building im seeing the following screen
My app has a valid provisioning profile except one .o file that is for some reason not included in it..
That has been the case for a while now, and i have managed to submit the app without it being a problem.
A couple of day ago, after submiting a new version, i recived an email from apple saying :
We have discovered one or more issues with your recent delivery for "xxx". To process your delivery, the following issues must be corrected:
Invalid Signature - Code object is not signed at all. The binary at path [xxx.app/FooterCoverflowCollectionViewLayout.o] 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). 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. For more information, please consult https://developer.apple.com/library/ios/documentation/Security/Conceptual/CodeSigningGuide/Introduction/Introduction.html
Once these issues have been corrected, you can then redeliver the >corrected binary.
Regards,
The App Store team
I've tried the steps they recommended with no luck. Can anyone have any idea how to solve the issue ?
Removing the mentioned file, building, re-adding it to the project and building again solved the problem.
I experienced this exact problem, and would like to share what happened.
The .m file for one of the classes we had written (ie: not a third party library) had been erroneously added to the project in the "Copy Bundle Resources" section in "Build Phases". There is no reason for the file to have been there, and had been there for quite a long time.
The error described in the original post just started showing up in our latest submission to the app store last week, and from what I gather from other posts around the internet, Apple has recently changed something about their code signing and submission process. The .m was absolutely in the Copy Bundle Resources section in our last several submissions.
Simply removing this file, rebuilding, and resubmitting solved the problem. Since the file didn't need to be there in the first place, there was no need to add it back again.
There may be other causes for this error, but if you get this error, check your "Copy Bundle Resources" section the files that are being listed with zero entitlements.

Error while submitting app to itunes connect: "Invalid Signature - Code object is not signed at all"

Well, all was good with submitting to itunes connect, but out of the blue, I just got this email right after uploading my app:
Invalid Signature - Code object is not signed at all. The binary at
path [churningseas.app/churningseas.codea] 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). 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.
I've seen that this a commun, infamous error message, and that there is no clear answer to how to fix this.
Has anyone an idea on what could be wrong with my settings? Thanks you so much in advance, I'm suppose to release the app this month and I'm freaking out a little bit here...
The email is asking you to check the churningseas.codea file. I had a similar issue except they were referencing a docset file in my project. After hours of debugging this issue, it has come to my attention that Apple is now frowning upon docset files. After removing the docset file it fixed my issue. You may want to check the churningseas.codea file and see if removing it doesn't fix your issue.
If that doesn't work check this answer Error itms-90035. There could be many causes for this error.

Invalid Signature (Invalid Binary) on iTunes Connect

I know is a duplicate question, but on all other questions i cant find a solution, so i retry to post question with more details.
I archive my app on xcode5 for iOS7 with Release Scheme and correct Provisioning Distribution
that's the screen:
This is on Project
And This is on Target
I try to do many different asset, i'am sure to my Building Archive is on Release but the answer of iTunesConnect is every time the same:
Dear developer,
We have discovered one or more issues with your recent delivery for
"MyApp". To process your delivery, the following issues must
be corrected:
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.
Regards,
The App Store team
And Invalid Binary
I become to crazy to understand how to sole this issue, any body have idea to do this?
Thanks.
****Test Response****
Athority Screen
is correct
In Xcode, at the target level do the following:
First choose the provisioning profile for the Release configuration. (For Any SDK)
The provisioning profile must match the app's Bundle ID (As you can see in the General tab).
In the code signing identity, tap on the sub-menu for Any iOS SDK and make sure you choose Automatic. If you can't see below.
Clean All and Archive.
Choosing CodeSign identity:
In step 2, if you can't choose Automatic, then it means you might not have a match between the AppID and the app's Bundle ID.
The AppID is pointed by the provisioning profile you chose.
If this is the case, then login in the developer portal and make sure that the provisioning profile you used points to the correct AppID.
To verify the the .ipa or .app before you submit try these commands.
Then look at the printout, and see if all looks right. Also verify the expiration date.
$cd <where the app is>
$unzip *.ipa
$cd Payload
$codesign -d --entitlement - *.app
$codesign --verify -dvvv *.app
$security cms -D -i *.app/embedded.mobileprovision
In Apple developer support, I've seen two additional common causes of the Invalid Signature binary rejection reason,
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.
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. 
Now it must be include following architecture.
armv7 armv7s arm64 i386 x86_64
Try this.

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:
In Apple developer support there are two additional common causes of the Invalid Signature binary rejection reason,
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.
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. 
This is what I did when I encountered a similar problem with the Mac App Store:
Re-generate the app's Distribution and Development certificates (from the Apple Developer's Certificates site).
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).
Re-fresh the certificates and identities from Xcode.
Open Xcode's Preferences.
Go to Accounts tab.
Clicked my account
Clicked the refresh button.
Generate the archive.
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).
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.
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.
Select correct code sign.
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
Under "Code Signing Identity" Make sure you have selected your Distribution Cert for the "Release" scheme
Under "Provisioning Profile" make sure you select a Distribution provisioning profile (not an Ad Hoc one)
Archive and distribute, make sure the same cert is selected when submitting (after entering your iTunesConnect info)
After doing all of the above
Menu Bar
try Product->Archive
Then from the organise try resigning and submitting.
Window->Organiser
Select archive and then press distribute (but i'm pretty sure you'll know how that works)
Obviously if you can't do this then chances are you have indeed got something wrong with your signing certificates, more specifically your bundle identifier is likely to be the culprit.
One other option is your app uses services that you haven't set up on developer.apple.com/ios for the app id such as game centre, push notification etc. Good luck
check your launch images . Are they conflicting like 2 images have got same name. Because i have got the similar issue which i solved like this within 10 minutes.
To figure out this problem I just created a new Xcode project and copied and pasted everything into the new project.
In my case the problem was to not ASCII chars in filename (someone did sent us to embed), solution was to do a global search in project:
ls -1 -R -i | grep -a "[^A-Za-z0-9_.':# /-]"
And delete those chars from filenames.

Resources