How to build IPA for distribution with TestFlight

2019-01-12 09:45发布

问题:

In XCode 5(.1.1) how to I get an IPA for distribution via TestFlight?

  1. I set the code signing identity and provisioning profiles for the release to my distribution profile
  2. I build the archive (Select iOS Device from the menu, then Product>Archive), which succeeds.
  3. I select the archive in the organizer and click "Distribute..."
    1. I choose "Save for Enterprise or Ad Hoc Deployment
    2. I choose my distribution profile (same as in 1 above)
    3. I click export.
  4. XCode gives an error message

Code signing operation failed
Check that the identity you selected is valid.

What should I do?

Update:

  1. I deleted my certificates, app ids, and provisioning profiles from the apple dev center, and from my keychain access (locally).
  2. I recreated the certificates, app id, and ad hoc provisioning profile.
  3. I synced my info into XCode from the dev center
  4. I updated the code signing identity and provisioning profile build settings for the project and the target to use the new distribution provisioning profile.
  5. I archived the project again.
  6. I clicked distribute in the archive organizer
  7. i chose ad hoc
  8. i chose my new ad hoc distribution profile (from above)
  9. I get the same error

Code signing operation failed
Check that the identity you selected is valid.

(@mohacs suggestion) When I try to validate the archive, I get

No application records were found.
Applications must be ready for upload on iTunes Connect before they can be validated or submitted from within Xcode.

(@threeve suggestion) When I read on Code signing fails for Cordova app (using XCode 5.1.1 and Cordova 3.4.1-0.1.0) to check the (System) Console (thanks @shedd), I am not sure where to look, but under "System Log Queries," I looked in "All Messages," and I see no messages during my attempt to "Distribute".

回答1:

Thanks to @shedd and @threeve https://stackoverflow.com/a/25212574/1449799 THE ISSUES IS FIXED! Despite being unable to find any error messages in the Console, from www, I removed Gruntfile.js, karma-e2e.conf.js, karma.conf.js, and the entire node_modules directory.