Question

When I use Xcode 4 to create an app IPA fie, I go to Product --> Archive to get an Xcode Archive. I recently read the SO post here detailing on how to distribute an app in the AppStore. I followed the instructions in this post and my errors still persist.

Xcode Organizer Options for Xcode Archive

First, I begin with validation. When I click Validate I login, elect the correct code signing ID and then get the following error:

Packaging Operation Failed Error

I get the same error message when I attempt to distribute to the AppStore.

Any ideas as to why I cannot share and/or distribute my app?


EDIT

Previously, I was having trouble validating and distributing and as a result I would receive this error:

No Suitable Application Records were found

I fixed this problem by finishing my CCATs / Encryption Registration in iTunes Connect.

Was it helpful?

Solution

I got the same error and found this solution (Xcode 4.4).

In Build Settings/Code Signing I had "Don't Code Sign" in my first Archive attempt.

I then put a valid Distribution Certificate (in the Release identity) and, after Archiving, validation of package went flawless.

Thanks to Apple that at every release does something (undocumented) different from the previous version.

Cheers.

OTHER TIPS

Couple months late, but in case someone else encounters this problem and finds this question (as I did) and none of the other suggestions work for you. After reading the other answers, there seem to be multiple causes for this error.

In my case, it was because my project's scheme had its Archive build configuration set to Release, instead of Distribution. After changing this to Distribution, I was able to submit the app without issues.

Hope this helps someone else.

I had similar situation and standard solutions like removing files with prefix _. and certificate experimenting did not lead into success.

Build distribution of English version worked, but localised to Croatian did not. So I used heavy weapon. I installed Croatian keyboard layout. And guess what? Since that moment all worked out!

So maybe there was something else in the place, but I would suggest you at least to check if this matches your situation.

Possible error with your certificate/provisioning profiles. Here is a short summary of my certificate quest with Xcode 4.3:

  1. Make certain (in developer.apple.com) that you have created a distribution certificate
  2. Make certain your application id in Xcode matches perfectly the one in developer.apple.com
  3. Create your app in itunesconnect.apple.com
  4. Load the distribution certificate in your keyChain create a distribution provisioning profile for your app (make certain you add all devices when creating the provisioning profile)
  5. Drag the provisioning profile in Xcode organizer, LIBRARY section, Provisioning Profiles.
  6. Make your archive.
  7. In Xcode organizer, validate your app, then distribute it for ad-hoc.
  8. Eventually (if you are patient) Xcode will offer to save the IPA somewhere. Save it, place the IPA in a place where your testers can download it.
  9. After download, the tester can drag the IPA in iTunes (LIBRARY), and eventually sync up the device (if and only if their device UDID was checked when you created/modified the provisioning profile).

more or less. Best of luck.

ps. there is a free app in AppStore , Get UDID. Ask your testers to use that and email you the devices specifics, will save you tons of frustrations with the 40'ish characters long device ID.

It happnes to me when I've try distribute app from Xcode DEVELOPER PREVIEW. From actual version of XCode - everything works fine.

I was also seeing this inexplicable error, and tried all of the suggestions here with no success. I finally went and deleted my local certificates and provisioning profiles and downloaded them again from Apple's provisioning website. After making sure the code signing options were set correctly in my build settings, I cleaned the project and archived again and this time the error disappeared when I ran the validation step.

Check if the code signing entries are correct (containing the distribution profile) for both the project and the target. It is possible to archive the project even if only the project settings are correct.

To me the answer came after trying to validate my app after unsuccessfully submitting it to the MacAppStore. I thought that by validating it, I should get a more detailed error message, instead ot this "Packaging operation error". And here it comes:

enter image description here

And that was because I had to revoke my certificates (as for why I had to revoke them, don't ask, I don't know, it happens in one every 2 submissions...). And I had recreated only the Mac Submission certificate. Actually, you also need the Installer one. It waqs late, I thought do I really need this?... Hence I finally made twice the little dance in Keychain.app -> Request Certificate from a Certificate Authority... etc, uploading to itunesconnect, and downloading them back. After that, it worked.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top