Packaging Operation Failed in Xcode 4
Asked Answered
M

8

6

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.

Meeker answered 1/6, 2012 at 16:45 Comment(0)
B
6

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.

Bargello answered 27/7, 2012 at 10:16 Comment(1)
This did not fix my problem. I have recreated all development provisioning profiles and certs/keychain etc. The settings are correct for Entitlements and for code signing, I can;t find any problem with copy bundle resources. This is the worst error message I have ever seen, talk about USELESS. Where are the logs for the error?Merrill
S
2

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.

Sousaphone answered 28/9, 2012 at 14:55 Comment(0)
S
2

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.

Scibert answered 15/1, 2013 at 12:51 Comment(0)
C
1

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.

Chordophone answered 1/6, 2012 at 17:3 Comment(8)
I followed thru step 6. When I get to step 7 and attempt to validate the archive, I get an error message (posted in the question) even though I have an app with the same Bundle ID on iTunes Connect. Also, thanks for the app recommendation- it really helps.Meeker
You must add an app in ituneconnect with the same bundle ID as the one you are trying to distribute. On your bundle ID make certain it has the form 'com.maxpowerstudios.adventures' (one of my apps) ie without the hexadecilal prefix you will see in the developper.apple.com certificate management thingie.Chordophone
I did Code Sign correctly (as far as I know), but would you mind taking a look at my updated question above with edits?Meeker
Ah yes, that would do it. So now can you validate and distribute ? If all you want is to distribute ad-hoc (.ipa), i did a test this week with one of my apps, you can skip the validation and go straight to the distribution.Chordophone
No matter what I do, it ALWAYS results in a Packaging Operation failed error. The only thing I can do is generate an XARCHIVE file, which as far as I can see will only get me as far as I already am. Is there anything I can do with the XARCHIVE? Could there be any other factors attributing to the error?Meeker
Is the application version in your Info-plist the same as the one in iTunesConnect ? Also, if i recall, there is in the builds section of the navigator a detailed 'account' of the packaging. Look there to see if you get a more explicit message. It should have 'Archive 'Scheme name' ' as title.Chordophone
When I Archive in Xcode, other than few project warnings that I get during every build (non-relating to the archive) nothing seems off. I am getting this information in the Log Navigator by the way. Everything appears with a √ mark. Should I contact Apple?Meeker
No matter what I do, it ALWAYS results in a Packaging Operation failed error. <--- THISMerrill
J
1

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

Josephinejosephson answered 10/8, 2012 at 6:42 Comment(0)
B
1

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.

Bradberry answered 1/11, 2012 at 16:41 Comment(0)
L
1

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.

Lefty answered 2/1, 2013 at 10:28 Comment(0)
J
1

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.

Jeanniejeannine answered 29/6, 2013 at 21:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.