Why do I get a code sign error when I publish my app on app store? - iphone

Yesterday I tried to publish my app but I got an error:
Application failed codesign verification. The signature was invalid,
or it was not signed with an Apple submission certificate. (-19011)
This is my log:
warning: Application failed codesign verification. The signature was
invalid, or it was not signed with an Apple submission certificate.
(-19011)
Executable=/Users/IamMo/Library/Developer/Xcode/DerivedData/Jungle_Jumper-frylvnqvacnaoifljuswxrhwloju/Build/Products/Distribution-iphoneos/Jungle
Jumper.app/Jungle Jumper codesign_wrapper-0.7.10: using Apple CA for
profile evaluation Illegal entitlement key/value pair:
keychain-access-groups, {type =
mutable-small, count = 1, values = ( 0 : {contents = "5ZT9U8689K.com.RainbowMouth.junglejump"}
)} Illegal entitlement key/value pair: application-identifier,
5ZT9U8689K.com.RainbowMouth.junglejump AssertMacros:
filter_entitlements(entitlements_whitelist, entitlements_requested,
allowable_entitlements), file: codesign_wrapper.c, line: 932
- (null)

Your certificate must be a deployment certificate that is specifically designed for the App Store (so Ad-Hoc certificates won't work). You have to do these steps:
Create the deployment certificate in the provisioning portal. This can only be done by the team agent for the development account.
Download the deployment certificate to your machine (or use Xcode 4 to get the certificate). Be sure it is installed and shows up in the Xcode 4 organizer.
Go under Build Settings and change the Code Signing options for the 'release' version to point to this certificate.
If you follow these steps, you shouldn't have a code-signing error (be sure to use the validator before submitting your application as well).

As I see in your log, add an Entitlements-File to your project. To do this, right click in the left sidebar and click create file. In the appearing view select Code Signing and select the Entitlement. Press save. Next add the name of your Entitlements-File including the suffix (.plist) under the Build Settings of your configuration. (Code Signing Entitlements)
The probably most important thing is to open the Entitlements.plist and change the bool value of the only entry to "NO". That's it.
If you still have any problems, check if you selected your Distribution profile under your Release-Configuration (or which you created). Then try to archive your application und Product -> Archive. And then submit it using the organizer, it's a more powerful method than the Application Loader.

Related

verification failed as the authority is invalid

I'm trying to resign an ipa which is already signed with the developer certificate.
Now I'm resigning with the enterprise distribution certificate.
I've got proper provisioning profile, ios_distribution certificate to sign the app.
I'm following this answer Re-sign IPA (iPhone) for the resigning steps.
With this I'm successfully able to resign the ipa but when I try to install this via itools, I'm getting this error: verification failed as the authority is invalid.
Another thing is I'm resigning with the enterprise distribution certificate but still when i try to install the resigned ipa directly (keeping resigned ipa on dropbox) getting this error "safari can't download this file" which I believe should come when the app is not signed with the enterprise distribution certificate and someone try to download that file directly on iphone (not via appstore or itunes).This certificate says I can distribute this app outside the appstore, so I'm confused what I'm really missing.
I don't know about itools and the error message doesn't sound right, but it could be that
xcrun PackageApplication is copying your dev app's entitlements across to the distribution app and they don't match what's in your distribution profile. e.g get-task-allow may still be true.
If you use a distribution signing identity PackageApplication actually tries to fix this, but it just failed for me now and I get an unusable IPA. Ah, looks like it detects the "distribution-ness" of your signing identity with regular expressions. I was using the abbreviated form "My Company (ID)" form instead of "iPhone Distribution: Company Name (ID)".
If I use the longer form, the resulting binary installs fine. The more you know.
You can't install IPA files directly from Safari, you need to set up an itms anchor tag and a plist, and a bunch of absolute URLs as described here.

Application failed codesign verification. (-19011)

For a few days Im being stuck at this problem, I've tried to delete/clean all the keys/certification and redownload them, I've tried to remove all provision profiles and revoke them and renew them. But every time I'm getting this problem.
Im running the latest Xcode, 4.3.2.
warning: Application failed codesign verification. The signature was
invalid, contains disallowed entitlements, or it was not signed with
an iPhone Distribution Certificate. (-19011)"
Validate
/Users/jimmylind91/Library/Developer/Xcode/DerivedData/JagHarAldrig-bkpyqdmptyxcntauxwsbrsqbmlji/Build/Intermediates/ArchiveIntermediates/JagHarAldrig/IntermediateBuildFilesPath/UninstalledProducts/JagHarAldrig.app
cd "/Users/jimmylind91/Documents/xCode/Jag Har Aldrig"
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv PRODUCT_TYPE com.apple.product-type.application
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation
/Users/jimmylind91/Library/Developer/Xcode/DerivedData/JagHarAldrig-bkpyqdmptyxcntauxwsbrsqbmlji/Build/Intermediates/ArchiveIntermediates/JagHarAldrig/IntermediateBuildFilesPath/UninstalledProducts/JagHarAldrig.app
warning: Application failed codesign verification. The signature was
invalid, contains disallowed entitlements, or it was not signed with
an iPhone Distribution Certificate. (-19011)
Executable=/Users/jimmylind91/Library/Developer/Xcode/DerivedData/JagHarAldrig-bkpyqdmptyxcntauxwsbrsqbmlji/Build/Intermediates/ArchiveIntermediates/JagHarAldrig/IntermediateBuildFilesPath/UninstalledProducts/JagHarAldrig.app/JagHarAldrig
codesign_wrapper-0.7.10: using Apple CA for profile evaluation
/Users/jimmylind91/Library/Developer/Xcode/DerivedData/JagHarAldrig-bkpyqdmptyxcntauxwsbrsqbmlji/Build/Intermediates/ArchiveIntermediates/JagHarAldrig/IntermediateBuildFilesPath/UninstalledProducts/JagHarAldrig.app:
valid on disk
/Users/jimmylind91/Library/Developer/Xcode/DerivedData/JagHarAldrig-bkpyqdmptyxcntauxwsbrsqbmlji/Build/Intermediates/ArchiveIntermediates/JagHarAldrig/IntermediateBuildFilesPath/UninstalledProducts/JagHarAldrig.app:
satisfies its Designated Requirement test-requirement: code failed to
satisfy specified code requirement(s) codesign_wrapper-0.7.10: failed
to execute codesign(1)
- (null)
I too got the "Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate. (-19011)". I recently updated to Xcode 4.5.1.
In my case the solution was to go to my target's build settings and under "Build Options" change the "Validate Build Product" settings. I changed "Debug" from "Yes" to "No".
Just read on sdk forums it has to do with length of product name.
"All that I needed to do to sort this out was change the PRODUCT NAME in Build Settings to something shorter. Also make sure that in the info.plist the bundle name either reads from ProductName or is also short – it can be 3 characters since the bundle display name is the one that appears to users!" - Zuningo from sdk forum.
make sure that you have setup the distribution provisioning profile under your provisioning portal!
create new profile....download its and set it up...
that will fix your problem i hope.
greats from switzerland
Oliver
Downloading Distribution Certificate (not the provisioning certificate) from iOS Provisioning Portal and installing it fixed the problem.
I have three configurations: Debug; Release; Distribution. I had such problem and didn't understand what to do. I used a decision from user dre1138 and modernized it some. In TARGETS->myapp->Build Options->Validate Built Product I turned off Debug and Release in "No" and turn on Distribution in "Yes". Problem was decided.
I had to do two things:
Delete expired certificates in Keychain Access. By default they are not shown, you have to enable it in the menu.
Tick the checkbox "Entitlements [x] Use Entitlements File: " on the "Summary" Tab of the Target properties.

Application failed codesign verification

When I upload my app to the App store I am facing the issue below:
Application failed codesign verification. The signature was invalid,
or it was not signed with an Apple submission certificate
I did all of the changes below:
cleaning project,
cleaning all,
deleting build directory,
deleting certificates + profiles
and reinstall distribution provisional profile and distribuction certificate
but still I am facing the same problem. What am I missing?
First, check that your certificate is correct/valid. To do this, log in to the iOS Provisioning Portal with your Apple developer account and create a new distribution certificate. Make sure that you specify that you want to store you app on the iOS App Store. Create a certificate for the App Store by clicking the App Store radio button - don't choose "Ad Hoc". After that, download and install the newly created provisioning certificate.
Check that you've done the following:
Set your code-signing identity in the XCode project to use the new provisioning certificate.
Used the certificate for Distribution profile, not just Developer.
Used the "Clean all targets" function in XCode.
Deleted any build folders from your application's directory tree in the Finder.
After that, build and run your application.
For a fuller explanation, see Apple's documentation about this.
For the iOS error "Application failed codesign verification", see Apple's complete list of potential causes at the following URL "How do I resolve the error: Application failed codesign verification?"
I had the same issue and tried all the solutions listed and then some. But it turned out that it was something so simple, I could kick myself! Set your Archive Build Configuration to Release. You can do this by going into PRODUCT -> EDIT SCHEME -> ARCHIVE -> BUILD CONFIGURATION -> SET TO RELEASE.
Good Luck!

Application failed codesign verification. What do I do?

Xcode gives me this warning when I build the app for release.
Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
Do I need to delete all entries from my keychain and redo getting a certificate, provisioning profile, etc?
I can build and debug on the iPhone and iPad without a problem.
If you know how I can solve this dilemma, please provide exact steps or a way for me to contact you about this.
Thanks
----UPDATE -----
Build Log
Validate build/Release-iphoneos/iApp.app
cd "/Users/iosdeveloper/Documents/Programming/iPad/iApp HD"
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv PRODUCT_TYPE com.apple.product-type.application
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/Validation "/Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app"
warning: Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
Executable=/Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app/iApp
codesign_wrapper-0.7.10: using Apple CA for profile evaluation
/Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app: valid on disk
/Users/iosdeveloper/Documents/Programming/iPad/iApp HD/build/Release-iphoneos/iApp.app: satisfies its Designated Requirement
test-requirement: failed to satisfy code requirement(s)
codesign_wrapper-0.7.10: failed to execute codesign(1)
- (null)
Here's the checklist I go through when I've hit this:
Clean all targets, exit Xcode, then go drag the build folder from your project to the trash.
Do the Get Info on your project, make sure the Code Signing Entitlements and Code Signing Identity are selected correctly. Do the same for your Targets.
Login to the iOS Provisioning Portal and make sure the Distribution certificate has not expired. Also check the Distribution Provisioning Profile and make sure it is Active. Make sure the Certificate is properly in your Keychain and the Distribution profile is in Xcode Organizer (if you have multiple of the same one, delete all but the correct one and redo step #2).
Look at your Build Results on the failure and identify which profile it is actually using and make sure it is the right one.
You probably need to check what code signing profile is selected in your distribution build properties.
It looks like your target is "Development" but Xcode applied some of distribution settings to it, so the warning simply means your ad-hoc build has no valid AppStore submission certificate. Go to your target settings, choose the Release configuration and uncheck "Validate Built Product" option.
Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
i am got the Same Warning Message...
I just Changed to iOs Deployment target 4.3 to 3.2.2 its works perfectly .....
Note: you may have to go to XCode's "Project" and select "Edit Active Target (appname)",
which is near the bottom of the list ... in the new pane that opens, select "Build", then
under "Code Signing Identity" select your distribution provision. Note that this seems
to be editing a different thing than "Project" / "Edit Project" (editing "target" instead
of "project"). I found I had to edit both project and target's code signing identities.
I had exactly the same problem. It was due to installing Xcode 4.0.2 and 4.2 preview 3 at the same time. Removed both (through the provided uninstall scripts):
<Xcodedir>/Library/uninstall-devtools --mode=all
Then rebooted and installed 4.0.2 and it works :/
I have found the codesign process a headache - I always shudder when I get am ready to use Ad Hoc distribution to beta test. After the usual round of errors and failed fix attempts I ignored the "application failed codesign" error and sent the build to a beta tester. It worked without issue.
Very frustrating.
In the build log provided in the -UPDATE- section of the original post the root cause of the failed signature verification is expressed with the text:
"test-requirement: code failed to satisfy specified code requirement(s)". That particular flavor of failed signature verification is almost always caused by mistakenly signing your app with an iPhone Developer profile instead of an iPhone Distribution profile.
It can be confirmed with the steps in "How do I verify the certificate that was used to sign my app?". If the certificate "Identity" is "iPhone Developer: YOUR_NAME" instead of "iPhone Distribution: ..." that is the reason for the "Application failed codesign verification" error, and you can resolve it by performing the following steps:
1a). if you have not yet created an App Store Distribution Provisioning Profile yet, that is done on the "Distribution" tab of the "Provisioning" Section of the iOS Portal site.
Note, the "Distribution" tab is only available to Team Members whose role is either "Agent" (the one who signed up for the iOS Developer Program), or "Admin" (those that the Agent grant access to app-distribution capabilities).
1b). if you're fairly certain you have an App Store Distribution Provisioning Profile installed in your Xcode profile library, you can verify it is an App Store profile as well as the App ID associated to it by using the steps in section How do I confirm my Provisioning Profile is for App Store distribution?
2). verify that your Scheme 'Archive' task is mapped to "Release" using the steps in section:
"Creating an Application Archive"
3). check that you have an your App Store provisioning profile assigned to your "Release" Code Signing Identity using the steps in section
"Assigning Provisioning Profiles to Build Configurations".
Note: it's important to make these changes at the Target level Build Settings, versus the Project level ones, as Target settings override Project ones...you can think of the Project level build settings as 'defaults' to populate target settings (and any future targets) with. Also, Ensure the "All" button is depressed in the upper-left corner of Target Build Settings to reveal the "Code Signing Identity" section.
4). retry your Product > Archive.
If the issue persists after the above, I recommend continuing onto Apple's complete list of potential causes of this error at the following URL "How do I resolve the error: Application failed codesign verification?"
My problem was solved when I noticed that I only had a "team" provisioning profile, and the details in iOS Dev Center told me that it was not a profile fit for development because it had no device attached. So I created a second provisioning profile, which let me check the box for my device so that it had a device attached.
Then when validating or submitting the app from the Organizer window (after pressing 'Build and archive'), I first made the mistake of selecting this new profile as the code signing profile. That was wrong. The profile that worked was iPhone Developer.
Good luck!
PS: This whole submission process is a heap of abacadabra. Do you really have to create a zillion distribution profiles, provisioning profiles, etc.? It hasn't encouraged me in any way to better test my app. I already did that before I chose to upload, and clicking a hundred buttons labeled 'Create','Download' and 'Submit' isn't really a quality control process that added anything (well except being forced to buy an iPad and test on that). Who ever said iOS was developer friendly?
My problem was that the Archive scheme did not have Build Configuration of App Store, but of Release. To change this, go to Product -> Edit scheme, select Archive on left side and change Build Configuration to App Store. I am assuming the code signing is configured properly (with distribution certificate).
You probably created a new certificate without refreshing the provisioning profiles
Create your iOS Distribution Provisioning Profile for App Store Distribution
I solved this by deleting the Archive that's not validating from the Organizer, closed and reopened Xcode and built for Archiving again.
I then chose Archive from the drop down menu. After doing that my app passed validation.
Hope that helps.

Getting "Application failed codesign verification. ... " warning after adding Distribution configuration to xcode - how to solve this?

I went step-by-step for about 5 hours through the process of adding an Distribution configuration to xcode.
After that, I keep getting this error even when I build with my Debug Configuration:
Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
The only weird thing I had to do was this:
I've added an strange "Entitlement" file the way Apple said in the Provisioning Portal. Did exactly what they said.
I can build my app and it runs on the device, but I get that warning. Now what? Any way to solve this, or must I start from scratch for another 3 days?
Right-click on your Target, choose Get Info and click on the Build tab. Change the Configuration menu to match the correct distribution method (i.e. Ad Hoc Distribution or App Store Distribution). Then go to the "Code Signing" section, Code Signing Identity. Is your distribution certificate specified here?
I'm assuming you're doing an Ad Hoc build, since that's the only build type that uses the Entitlements.plist file.