Problems uploading to App Store - app-store

Hoping someone can help me here as this is driving me insane. I used to have no issues uploadeding to app store.... until i updated xcode to v4.
I have tried deleting all certificates, provisioning profiles etc and startng again but that doesnt work. I have checked that the builds are using the right profiles etc but that still bring up the following message as a yellow fault indicator (so still managed to build succesfully, just doesnt allow me to upload!)
Hopefully someone can help?
Validate /Users/Mac/Library/Developer/Xcode/DerivedData/xxxx-fwjaruekfnmkdjdwxcykohoidqyg/Build/Products/Distribution-iphoneos/xxxx.app
cd "/Users/Mac/Documents/Bxxxx/xxxx"
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/Mac/Library/Developer/Xcode/DerivedData/xxxx-fwjaruekfnmkdjdwxcykohoidqyg/Build/Products/Distribution-iphoneos/xxxx.app
warning: Application failed codesign verification. The signature was invalid, or it was not signed with an iPhone Distribution Certificate. (-19011)
Executable=/Users/Mac/Library/Developer/Xcode/DerivedData/xxxx-fwjaruekfnmkdjdwxcykohoidqyg/Build/Products/Distribution-iphoneos/xxxx.app/xxxx
codesign_wrapper-0.7.10: using Apple CA for profile evaluation
/Users/Mac/Library/Developer/Xcode/DerivedData/xxxx-fwjaruekfnmkdjdwxcykohoidqyg/Build/Products/Distribution-iphoneos/xxxx.app: valid on disk
/Users/Mac/Library/Developer/Xcode/DerivedData/xxxx-fwjaruekfnmkdjdwxcykohoidqyg/Build/Products/Distribution-iphoneos/xxxx.app: satisfies its Designated Requirement
test-requirement: failed to satisfy code requirement(s)
codesign_wrapper-0.7.10: failed to execute codesign(1)
- (null)

Fixed.
Nothing wrong with my coding - this was a certificate issue at Apple's end and that has been cleared up now.
To fix - delete all certificates and keys relating to your development and distribution profile, and mobile provisioning. Revoke certificates on the provisioning website and reapply for all.
This fixed mine, now no issues and app submitted fine!!

Related

iPhone code signing -- why would developer build complain about lack of distribution certificate?

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!

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.

no matter what keep getting "Application failed to code sign" error when trying to archive my app for submission to the app store

i have tried EVERYTHING, looked through dozens of articles and repeatedly made sure my certs were valid and profiles were legitimate, but i keep getting this error
warning: Application failed codesign verification. The signature was invalid, or it was not signed with an iPhone Distribution Certificate. (-19011)
Executable=/Users/roozmahdavian/Library/Developer/Xcode/DerivedData/Chances-clvdkoglyqraiefynxcmcsaqgjwg/Build/Products/Release-iphoneos/Chances.app/Chances
codesign_wrapper-0.7.10: using Apple CA for profile evaluation
/Users/roozmahdavian/Library/Developer/Xcode/DerivedData/Chances-clvdkoglyqraiefynxcmcsaqgjwg/Build/Products/Release-iphoneos/Chances.app: valid on disk
/Users/roozmahdavian/Library/Developer/Xcode/DerivedData/Chances-clvdkoglyqraiefynxcmcsaqgjwg/Build/Products/Release-iphoneos/Chances.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)
what am i supposed to do to fix this? its getting very frustrating
the App Store provisioning file for this app is corrupt or not available on your mac, or on Apples servers... delete the App Store provisioning file from the iOS dev dashboard, then recreate it, download it, and it works
Before you delete it, make sure other parts are ok and problem is only this one ...

Application failed codesign verification on Xcode 4.0.2 after repeatedly clearing keys, recreating project

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?"

Signature invalid only for ad hoc

I'm not sure what changed on my ad hocs but I get this error when trying to install:
Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)
Device debug builds fine. The cert that is associated with my ad hoc provisioning profile doesn't expire until 2011. I've searched Google but haven't found any applicable solution, except some mention about deleting and recreating the certs. Before I go down that rode, has any one experienced and resolved this issue?
I'm using Xcode 3.2.3 and building against sdk 3.0.
Sometimes I get this issue as well. Do you have any expired profiles on your phone? I find that sometimes expired profiles (even if it is for a different application) will cause debug builds to not install.
If all else fails, delete all the certificates associated with your developer account from Apple in Keychain Access. Get yourself a new certificate, and modify the provisioning profiles to reflect the new certificate. This is a huge pain, but if all else fails, this works.
Hope this helps!