开发者

Xcode 4: Keep Failing Codesign Verification when Building

开发者 https://www.devze.com 2023-04-02 06:04 出处:网络
I\'m building my app with the correct Distribution Certificate and building an archive so I can submit to Apple.

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!

  1. Make sure there's no spaces or special characters in your Product Name (and Bundle name?)
  2. Make sure all of your production targets (e.g. both Ad Hoc and App Store) have valid profiles chosen for codesigning
  3. Choose explicit profiles, not the "iPhone Developer" or "iPhone Distribution" wildcards
  4. Make sure the profile you're using isn't expired
  5. Remove expired profiles from your keychain
  6. Delete duplicate profiles from your keychain
  7. If you have multiple versions of XCode installed, use "xcode-select -switch [path]" to make sure you've got the right version active
  8. Use absolute paths for "Build Products Path" - specifically, never use ".."
  9. 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
  10. 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.

0

精彩评论

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