Invalid Binary with Invalid Signature - ios

I am in the process of submitting my first Ionic application to the store. However I am receiving an error every single time that I try to submit my binary to the store:
Invalid Signature - A sealed resource is missing or invalid. The binary at path [Who Paid Last?.app/Who Paid Last?] contains an invalid signature. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate....
I have verified that my certificates are correct. I have even tried moving my .git folder outside of the directory, but still no luck. I have tried about 7 different configurations and still the same result time and time again.
The crazy thing is that after my archive has been built, I validate using XCode's validator. The validator says that my .ipa has zero errors and that it is ready for submission, but iTunes Connect says differently.
I have also tried following this tutorial on troubleshooting but without any luck.

The issue had to do with the name of my app. The name of my application is Who Paid Last?, and come to find out, the "?" in the name is what was causing the issue. As soon as I removed it, the app was submitted just fine with out any issues.

I had a similar issue, but my error message was "Invalid Signature. Code object is not signed at all. The binary at path [myApp.app/www/js/02_jshint.js] contains an invalid signature...."
Deleting the #!/usr/bin/env directive from the top of my 02_jshint.js file, then building the iOS version of your project from the CLI worked for me.

Related

Invalid Signature - Itunes Connect

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.

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.

Receiving Installation Error: ApplicationVerificationFailed in Flash Builder for iOS

This is the error I'm getting when I try to install my app on my iPhone.
More details:
It did work at one point. I used a different computer recently, working on a different project and had to create a new certificate. This invalidated my other projects (profiles). I went back to working on the first computer and uploaded the certificate from that one. I recreated the app profiles and downloaded the provisioning files based on that previous certificate. None of that worked. In the end I had to start over from scratch as shown in the answer below.
I finally got it to work by starting over from scratch. I think the problem was that when I went to a new computer and uploaded a new certificate I had to revoke the old certificate. It seems that once it's revoked that maybe it can't be used again.
So I recreated my signing certificate, recreated a p12 file from it, recreated (modified) the app profile (making sure to select my certificate again and selected all of my devices again), redownloaded the mobile provisioning file, reselected these in the iOS configuration screen and restarted Flash Builder and it worked again.
I had tried to use a wildcard, "com.myactualdomainhere.*" and I couldn't get that to work but I didn't do all the steps above (I didn't recreate my signing certificate) and if you can't reuse a certificate then that may have been the issue.
So I did all the steps above and used the app name, "com.myactualdomainhere.MyApp" and made sure it matched in the application descriptor file (for AIR apps) com.myactualdomainhere.MyApp.
It would be nice if someday they could simplify this process and give better error messages. Maybe they could verify the different parts along the way, for example, "your certificate is ok, your app profile checks out, but your app id is incorrect."
Also, MilkyWay posted a link to a post that has some more helpful information.
I experienced this error working with code from another vendor. As it turns out, they were trying to compile the IPA with an Entitlements.plist file. I just deleted that block of code (below) and it compiled just fine.
<Entitlements>
<![CDATA[
<key>get-task-allow</key>
<true/>
]]>
</Entitlements>
I've just been stuck with this problem this morning, took a while to figure out so thought I'd post incase anyone else has the same issue.
We had a problem adding a device to our provisioning profile, an iPhone 5 on iOS7. It turned out that the application we were using to get the UDID (UDID+) was giving us the wrong UDID. When I used the ID returned by
adt -devices -platform ios
It worked.
In my case it was at matter of unaccepted characters in some embedded folders. Folder names that contained special characters (æ ø å or whitespace) resulted in an ApplicationVerificationFailed error. (Not exactly the most precise error description I have encountered.)
I know this is an old thread, but if anyone else is Googling around and finds this thread and it does NOT fix your issue, I wanted to share my experience on this one. If you've confirmed that your certificates and provisioning profiles are all good and are still getting this, I determined that you will receive this exact same error if you have your app configured for TESTFLIGHT. In other words, in your APPNAME-app.xml make sure that the following is commented out within the IOS entitlements section:
<key>beta-reports-active</key>
<true/>
Once I commented that out, I was able to resume debugging locally. Pissed that I spent a day on this, but at least it's working now.
This can also happen if you change your Apple ID password.
My problem was that in my Application ID under apple developers, my app wasn't checked for PushNotification, but within my xml application descriptor, I had the entitlments for push notifiaction (aps_development).
Once à removed the APS value from my XML, worked all good.
If you haven't compiled in a long time, be sure you set your compilation settings to device testing and make sure you are using your testing provisioning profile. I got this today because my settings were still on app store.
The problem for me was that I was using a .p12 file which was meant for Apple Push Notifications instead of the .p12 file of my Developer certificate..
I used the .p12 I exported from my developer certificate and it works great..!
In my case it was incorrect application id problem (different compiled app id then app id I have defined apple)
sometimes this error occurs because of you bin-debug folder.
if that folder has some unknown character or something this error occurs.
I suggest if in that case you have to clean the project or find that file and change it's name
If it was working previously, just restart the flash builder.
I did some tests today on test flight with the Entitlements tags. It need to be remove when testing localy or I get the same error.
Like jbyun94 mentionned, get rid of unknown characters in filenames.
I had files in conflict from dropbox that prevented the app from compiling.
Removed them and everything worked again (though I'd lost a couple of hours :/)

Why does xcode throw this error even though the profiles are set to distribute?

So I am submitting my First App. I have followed various guides and documents to the letter and managed to upload it to the itunes app store one time. It came back as invalid binary relating to an icon path. Fair enough... I applied what I felt was a fix then BANG! Everytime I tried to upload it since then it comes back with an error, this error to be exact.:
warning: Unable to extract codesigning entitlements from your
application. Please make sure DoorStop is a valid Mach executable
that's properly codesigned. (-19050)
/Users/jackson/Library/Developer/Xcode/DerivedData/DoorStop-gfwhzvdhgmutfhdhfmqznkcnzmak/Build/Intermediates/ArchiveIntermediates/DoorStop/InstallationBuildProductsLocation/Applications/DoorStop.app/DoorStop:
invalid signature (code or signature have been modified)
- (null)
Now I have a feeling I know what your going to say, you need to make sure its signed with a distribution profile, It is. I created a new one and tried that, i deleted my developer certificate and distribution certificate from the keychain and re-added them....
Ok so just thought I would answer this question since I solved the problem.
On first submission I had done everything correct. However in an attempt to solve the Icon Path invalid binary I got, I had changed the .plist file. Since that point My App would not validate.
This is due to the fact that for some reason, Xcode had duplicated my .plist file. And was creating a new one with the new edits. To avoid this I simply removed one one .plist file and made sure that i edited the original from the Info Area of the Target, instead of doing it manually.
This avoided Xcode getting confused and the App has been successfully submitted. :)

Validation/Submission error: Application failed codesign verification

I have a number of apps that are almost identical (with the exception of a few constants, images, and a sqllite database file). I've never had any issues submitting them before, however today one of the updates gave the following error when validating/submitting (note: I have updated this app in the past with no issues):
Application failed codesign verification. The signature was invalid, or it was not signed with an iPhone Distribution Certificate.
I've spent all day trying everything to get this to work. I even diff'd the entire project folder against another app (which submitted successfully, today), and all build/signing settings are exactly the same (except bundle identifier, version number, etc.). I've even (as a last resort!) revoked the certificate and re-generated everything, including provisioning profiles.
I've been through all of the steps listed here:
https://developer.apple.com/legacy/library/technotes/tn2250/_index.html#//apple_ref/doc/uid/DTS40009933
However, if I "Share" the app from the Organizer and save to disk, running codesign -dvvv says it's not signed at all (however, this happens with the ones that worked!). Not sure how else to run this, as the file generated (and shown in Organizer) is not a .app file.
I'm at a total loss how to figure out what's wrong with this, or why it's any different to the others. I don't seem to be able to get any more information out of the Organizer. The app was built exactly the same way as the others, and the project files etc. are identical (except for expected differences like images/names).
Ok, fixed this... I wish I'd tried this sooner, as it would've saved me many hours today!
It seems that the App Store provisioning file for this app was somehow corrupt - not on my Mac, but on Apples servers.. I downloaded it many times today, with no luck. I just discovered that selecting the Ad-Hoc profile during Validation worked, which led me to believe it was specific to the App Store one. So I deleted the App Store provisioning file from the iOS dev dashboard, then recreated it, downloaded it, and it worked!
Before I deleted it, I edited it, and everything was set correctly, and the expiration date was 6 months from now, so I can only assume something was broken Apple's side (even though I'm sure this same file worked in the past!) :-(
I also have the same problem.
All my provisioning Profiles, Certificates, Bundle Identifier every thing was perfect.
Except My Apps Executable file Name in Info.Plist and Product Name in Target Build Settings was slightly different.
And just because of that codesign_wrapper was not able locate Provisioning.
I spend nearly one day to figure this out.
So Please do one check
App Product Name is have to be same with your Executable file in Info.Plist.
I have a very similar problem, but in my case my distribution profiles keep disappearing from my system. So when an application specific distribution profile disappear Xcode picks up another one (wildcard, iPhone developer, etc.) which is not correct. Everything looks fine except I get this error.
My solution was that I downloaded all of my code signing profiles from Apple. I saved them in a directory and whenever one "disappears" I just have to double click the correct profile to add it to Xcode and update "release" entry in Code Signing Identity in plist.

Resources