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.
Related
Here is the error I am getting. This is preventing me from testing the developer build of my app on my iPad device. The "failed to satisfy specified code requirement(s)" line grabs my attention, but I have no idea what it means.
Validate /Users/william/Library/Developer/Xcode/DerivedData/GraphingCalculatorDeluxe-fduucejdaajqvxekndurxjggarcu/Build/Products/Debug-iphoneos/GraphingCalculatorDeluxe.app
cd /Users/william/Documents/GraphingCalculatorDeluxe
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/william/Library/Developer/Xcode/DerivedData/GraphingCalculatorDeluxe-fduucejdaajqvxekndurxjggarcu/Build/Products/Debug-iphoneos/GraphingCalculatorDeluxe.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/william/Library/Developer/Xcode/DerivedData/GraphingCalculatorDeluxe-fduucejdaajqvxekndurxjggarcu/Build/Products/Debug-iphoneos/GraphingCalculatorDeluxe.app/GraphingCalculatorDeluxe
codesign_wrapper-0.7.10: using Apple CA for profile evaluation
/Users/william/Library/Developer/Xcode/DerivedData/GraphingCalculatorDeluxe-fduucejdaajqvxekndurxjggarcu/Build/Products/Debug-iphoneos/GraphingCalculatorDeluxe.app: valid on disk
/Users/william/Library/Developer/Xcode/DerivedData/GraphingCalculatorDeluxe-fduucejdaajqvxekndurxjggarcu/Build/Products/Debug-iphoneos/GraphingCalculatorDeluxe.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 am doing a debug build, signing as my developer identity. Here is the output of codesign in the terminal:
Williams-iMac:Debug-iphoneos william$ codesign -dvvv GraphingCalculatorDeluxe.app
Executable=/Users/william/Library/Developer/Xcode/DerivedData/GraphingCalculatorDeluxe-fduucejdaajqvxekndurxjggarcu/Build/Products/Debug-iphoneos/GraphingCalculatorDeluxe.app/GraphingCalculatorDeluxe
Identifier=com.jockusch.calculator
Format=bundle with Mach-O thin (armv7)
CodeDirectory v=20100 size=10772 flags=0x0(none) hashes=530+5 location=embedded
Hash type=sha1 size=20
CDHash=96b088a0cd93ff9b5adc9552bbc29e4cef247356
Signature size=4338
Authority=iPhone Developer: William Jockusch (B86JCKGV32)
Authority=Apple Worldwide Developer Relations Certification Authority
Authority=Apple Root CA
Signed Time=Jul 10, 2012 8:08:35 PM
Info.plist entries=30
Sealed Resources rules=3 files=564
Internal requirements count=1 size=292
Williams-iMac:Debug-iphoneos william$
EDIT: I'm telling Xcode to use my developer profile. See the screen shot below.
Check whether you've set the Code Signing's name (your project target -> Build Settings -> Code Signing) correctly:
The problem was apparently related to Xcode mixing up two different developer accounts.
I develop both for myself and as a team with someone else. I had recently submitted an app for the team. As a result, the portion of Xcode that logs in to iTunes Connect to distribute apps was set to that account.
When I compiled this app, even though all the settings appear to be pointing to stuff on my own account, some part of the team information was apparently confusing some aspect of it.
The reason I believe this is that the problem went away after I did the following:
Go to the organizer.
Navigate to an archive of the app.
Click the "distribute" button.
Sign in to iTunes connect as myself
I then got a message saying that no suitable application records were found.
Build again, problem recurred.
quite Xcode and delete my build folder.
Restart Xcode
Repeat steps 1-5.
Build again. It worked!
Under the "Code Signing" section in Build Settings I have "Debug" set to "Don't Code Sign", and the indented line below it "Any iOS SDK" set to the "iPhone Developer" value.
When I build and run, Xcode tells me:
warning: Application failed codesign verification. The signature was
invalid, or it was not signed with an iPhone Distribution Certificate.
(-19011)
The point is, I'm using the Debug configuration! Anyways, so I changed this to the Distribution Certificate, but now Xcode thorws an error that there is no valid Ad-Hoc Distribution Provisioning Profile on my device. Of course there is not, because I just want to develop as usual.
Previously I had installed the Distribution Certificate. That's where the mess began.
Did anyone else encounter this problem and found a solution how to fix it?
You could create Developer Certificate and developer profile. Don't use Ad-Hoc Distribution Provisioning Profile at debug. Please check your Developer Certificate.
This is the same exact error you get when submitting an app(building as an archive and using the distribution profile) It would be helpful if you posted a screenshot of your Build Settings for both your target and your project as there are many things that could be wrong. But it seems like the main problem is your code signing.
I have been getting this problem for almost 4 hours now, getting very frustrated. I have gone through and revoked my certs and provisioning profiles 3 times now and started from scratch. I've also ensured my project was set to use the DISTRIBUTION profile. I revoked and deleted my development cert/prof just so I couldn't select it by accident. My mobileprofile is being copied correctly. I'm using Xcode 4.0.2. I started a new project and dumped my files in there and I get the same problem there..
I super-double-triple checked the directions to get certs. Created private keys, sent file to developer provisioning portal, got a cert back, it loads up and matches my private key.. have deleted all non relevant keys. Have deleted all old provisioning profiles that were saved in MobileProfile/..
here, really, my project is set up right!!
here, really, my target (only target!) is set up right!
Here's my keychain.. certs look good
My super-slow-carefully-made provisioning profile shows up just fine in Xcode, it's certainly recognized as being good and signed
What I'm getting is:
rocessProductPackaging "/Users/rcl/Library/MobileDevice/Provisioning Profiles/AFFB40FF-FE57-4131-A1D1-0804E0E747FF.mobileprovision" /Users/rcl/Library/Developer/Xcode/DerivedData/iMan-hapawfvbfkeskkaembwcgifzypdz/Build/Products/Release-iphoneos/iMan.app/embedded.mobileprovision
cd /Users/rcl/Documents/iMan/iMan_On_Xcode402/iMan
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
"/Users/rcl/Library/MobileDevice/Provisioning Profiles/AFFB40FF-FE57-4131-A1D1-0804E0E747FF.mobileprovision" -o /Users/rcl/Library/Developer/Xcode/DerivedData/iMan-hapawfvbfkeskkaembwcgifzypdz/Build/Products/Release-iphoneos/iMan.app/embedded.mobileprovision
Then..
ProcessProductPackaging /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/Entitlements.plist /Users/rcl/Library/Developer/Xcode/DerivedData/iMan-hapawfvbfkeskkaembwcgifzypdz/Build/Intermediates/iMan.build/Release-iphoneos/iMan.build/iMan.xcent
cd /Users/rcl/Documents/iMan/iMan_On_Xcode402/iMan
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/Entitlements.plist -entitlements -format xml -o /Users/rcl/Library/Developer/Xcode/DerivedData/iMan-hapawfvbfkeskkaembwcgifzypdz/Build/Intermediates/iMan.build/Release-iphoneos/iMan.build/iMan.xcent
Then...
CodeSign /Users/rcl/Library/Developer/Xcode/DerivedData/iMan-hapawfvbfkeskkaembwcgifzypdz/Build/Products/Release-iphoneos/iMan.app
cd /Users/rcl/Documents/iMan/iMan_On_Xcode402/iMan
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv _CODESIGN_ALLOCATE_ /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
/usr/bin/codesign -f -s "iPhone Distribution: Robert Lorentz" --resource-rules=/Users/rcl/Library/Developer/Xcode/DerivedData/iMan-hapawfvbfkeskkaembwcgifzypdz/Build/Products/Release-iphoneos/iMan.app/ResourceRules.plist --entitlements /Users/rcl/Library/Developer/Xcode/DerivedData/iMan-hapawfvbfkeskkaembwcgifzypdz/Build/Intermediates/iMan.build/Release-iphoneos/iMan.build/iMan.xcent /Users/rcl/Library/Developer/Xcode/DerivedData/iMan-hapawfvbfkeskkaembwcgifzypdz/Build/Products/Release-iphoneos/iMan.app
Then....
Validate /Users/rcl/Library/Developer/Xcode/DerivedData/iMan-hapawfvbfkeskkaembwcgifzypdz/Build/Products/Release-iphoneos/iMan.app
cd /Users/rcl/Documents/iMan/iMan_On_Xcode402/iMan
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/rcl/Library/Developer/Xcode/DerivedData/iMan-hapawfvbfkeskkaembwcgifzypdz/Build/Products/Release-iphoneos/iMan.app
warning: Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
Executable=/Users/rcl/Library/Developer/Xcode/DerivedData/iMan-hapawfvbfkeskkaembwcgifzypdz/Build/Products/Release-iphoneos/iMan.app/iMan
codesign_wrapper-0.7.10: using Apple CA for profile evaluation
AssertMacros: signer, file: codesign_wrapper.c, line: 610
AssertMacros: profile, file: codesign_wrapper.c, line: 914
codesign_wrapper-0.7.10: Failed to load provision profile from: /Users/rcl/Library/Developer/Xcode/DerivedData/iMan-hapawfvbfkeskkaembwcgifzypdz/Build/Products/Release-iphoneos/iMan.app/embedded.mobileprovision
- (null)
Edit:
One note is that I have had Xcode 4.2 beta installed, not sure if that could be causing issues? I used the provided script and did a full uninstall of the beta developer tools and installed Xcode 4.0.2 again.
Edit:
I've tried generating the private keys in my own name and also my company's name, for 'Common Name'. I initially registered with the apple developer program with my own name, but when I set myself up on iTunes Connect I used my business name as the name I wanted to appear. It seems the CERTIFICATE I'm issued obviously uses my real name. I've tried setting the common name on private key to both things with no luck, but which is correct?
Edit:
And to be clear, the file /Users/rcl/Library/Developer/Xcode/DerivedData/iMan-hapawfvbfkeskkaembwcgifzypdz/Build/Products/Release-iphoneos/iMan.app/embedded.mobileprovision definitely exists and matches the md5sum of my ~/Library/MobileDevice/Provisioning Profiles../ file (the only one that exists, the one I want to use.)
Edit:
When creating my distribution provisioning profile, it doesn't seem to matter what I pick for my App ID - they all give the same results. Is there something that needs to match up with this App ID?
Edit:
Ok I'm "getting somewhere" or walking backwards. So my bundle ID specified by me has been com.panagiaindustries.iman ; apple issued me SR49T455EV.com.panagiaindustries.iman ... if I build my app with the com.pana... one, it fails to codesign within xcode. if I build with the SR49T... one, it codesigns, but when I use Application Loader I get 'Bundle identifier SR49T... differs from reserved bundle ID: com.pana...' as an error. Which SHOULD I be using?
Edit:
Adding the following entitlements file seemed to have no effect:
get-task-allow
application-identifier
SR49T455EV.com.panagiaindustries.iman
I had gone from Xcode 4.0.2 to 4.2.x beta, then back to 4.0.2. After this, Xcode wasn't working so I ran the "official perl" uninstaller script, then reinstalled 4.0.2. Xcode worked.. but apparently I was still using some beta tools. I resolved my problem by mv /Developer /Developer.old and install "fresh" 4.0.2.
These are the following steps needed to build an iPhone app under an Apple Distribution License and upload it to the App Store.
Create A CSR from Keychain Access in a Mac machine.
Access Keychain Access as Finder>>Applications>>Utilities>>Keychain Access.
Upload this CSR while creating a Distribution Certificate.
An Apple License can have only one Apple Distribution Certificate.
Download Distribution Certificate.
Open Keychain Access.
Access Keychain Access as Finder>>Applications>>Utilities>>Keychain Access.
Install the downloaded Distribution Certificate.
Right Click on the Distribution Certificate and select "Export Certificate" and save as Personal Interchange Certificate (.p12) format in destination Library>>Keychains.
For every new application we need to create new Provisioning Profiles under one Apple Distribution Certificate.
For each new Provisioning Profile, we need to create a new App Id.
So we need to create a Adhoc and Appstore Provisioning Profile.
Adhoc Provisioning Profile is for testing the app in apple devices.
*Appstore* Provisioining Profile is for uploading the app to appstore.
Download the respective Provisioning Profile and double click on the profile to install it.
Delete all the previous profiles and just retain the newly installed profile.
Build the application by selecting the Code Signing Entity as the newly installed Provisioning Profile.
6 Upload the ApplicationName.app.zip file as the binary file in Application loader while uploading the application to appstore.
Reference: https://developer.apple.com
I believe this would be of some help to you.
I don't see anything listed under code signing entitlements (line just above the provisioning stuff). Open the new file assistant and look under resources for entitlements file. Then add one key pair:
<key>get-task-allow</key>
<true/>
In theory it will add this for you, but I remember some versions of Xcode have been bad about actually adding it. There should also be one other key pair:
<key>application-identifier</key>
<string>[someNumber].[bundleID]</string>
I'm not sure where the number comes from, though it might be the App ID from iTunes Connect.
In the build log of the original post you can see the root cause of this particular signature verification failure expressed with the text: "..Failed to load provisioning profile from: (x)". I've experienced two cases of this particular signature verification failure, and both were successfully worked around by updating to Lion 10.7.2 and the latest Xcode for Lion (currently Xcode 4.2.1).
For others experiencing the "Application failed codesign verification" during Xcode Archive Validation or Submission, look to the build log at Product > Archive time for a build warning by the same title and expand that for the root cause. Then take a look at Apple's complete list of potential causes of this error at the following URL "How do I resolve the error: Application failed codesign verification?"
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.
I am trying to prepare my app for distribution to the app store and am getting the following warning in Xcode which is causing an error in ApplicationLoader. I know this is a common problem from searching but I have yet to find a proper solution? I went thru Apple's steps for distribution on the iOS provisioning portal and still get this error.
My distribution profile is set on my Target.
"Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)"
Any suggestions?
1) Check for the scheme in 4.2
2) make sure you have selected the release scheme
3) make sure you have selected the distribution profile
4) build for archiving .
App distribution certificate is only used for the app store. You will get this error if you try and put an app signed with your distribution certificate on your phone -- it simply won't work.
Do you have a valid iPhone Distribution certificate in your Keychain?
Does the Xcode Organizer Provisioning Profile window show your Distribution provision?
Does your distribution provisioning profile have an app ID that is the same or compatible (wildcard) with the Identifier setting in your Target Info Properties setting?
Edit: added:
Do you have exactly one iPhone Distribution certificate in your Keychain?
Did you do a Build Clean in Xcode before your distribution build? (or rm -rf ./build)
First of all, check your Certificate, is it distribution or developer? And it must be Distribution certificate.
Follow these steps:
clean all certificate from your keychain and download new distribution certificate.
Also clean remove the distribution provisioning profile what you use for the particular for your this application and re download that one. after that must be clean build in Xcode and after that in project setting you must be select the particular D.P.P. for your application and go a head just only build it. then you get the particular build.
Regarding the D.P.P you must be clear what type of profile you create for this. it must be Appstore D.P.P.
I hope it should be helpful for you.
I had a similar problem. For me it turns out that I didn't download the "distribution" provisioning file (note the emphasis on the "distribution"). Once I got that, everything worked. I'm almost certain that that's what your problem is ;)
cheers,
Matt