Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Packaging Operation Failed in Xcode 4

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.

like image 230
Sam Spencer Avatar asked Jun 01 '12 16:06

Sam Spencer


4 Answers

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.

like image 73
stefat Avatar answered Sep 20 '22 22:09

stefat


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.

like image 39
Sebastian Avatar answered Sep 21 '22 22:09

Sebastian


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.

like image 39
vedrano Avatar answered Sep 21 '22 22:09

vedrano


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.

like image 38
YvesLeBorg Avatar answered Sep 23 '22 22:09

YvesLeBorg