开发者

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!!

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

here, really, my target (only target!) is set up right!

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

Here's my keychain.. certs look good

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

My super-slow-carefully-made provisioning profile shows up just fine in Xcode, it's certainly recognized as being good and signed

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

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/De开发者_C百科rivedData/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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜