I'm building my app with the correct Distribution Certificate and building an archive so I can submit to Apple.
Upon verification, it keeps giving me this error about failing开发者_StackOverflow社区 verification.
When I look at the log, the error says:
Application failed codesign verification. The signature was invalid, or it was not signed with an iPhone Distribution Certificate. (-19011)
Any idea how I can fix this?
Thanks,
JH
PS: Using Xcode 4.2
I ran into this problem today. Solution #2 below fixed my problem, but here's a list of things to try. If anyone else has suggestions please add them in comments!
- Make sure there's no spaces or special characters in your Product Name (and Bundle name?)
- Make sure all of your production targets (e.g. both Ad Hoc and App Store) have valid profiles chosen for codesigning
- Choose explicit profiles, not the "iPhone Developer" or "iPhone Distribution" wildcards
- Make sure the profile you're using isn't expired
- Remove expired profiles from your keychain
- Delete duplicate profiles from your keychain
- If you have multiple versions of XCode installed, use "xcode-select -switch [path]" to make sure you've got the right version active
- Use absolute paths for "Build Products Path" - specifically, never use ".."
- Open the .pbxproj file in a text editor and check to make sure all your targets use the right profile. I had an x86 distribution target for some reason and it was referring to an old profile. Search for
PROVISIONING_PROFILE=12345678-blah-blah-blahblah
- Double-check your Archive scheme to make sure you're based off the right build configuration
Much harder fixes, might require hours:
- Delete the cert & profile completely, then re-download them
- Delete your ad hoc target and rebuild it from scratch (kind of a last-ditch effort)
- Create a new certificate and start over
- Upgrade to the latest non-beta version of XCode (4.1 as I type this; beta versions cannot be used to create distribution builds)
Pretty sure you can't build archives for submission with xcode 4.2 yet. Only xcode 4.1.
I got this when accidentally validating my archive using my developer provisioning profile instead of my distribution provisioning profile.
精彩评论