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.

Community
  • 1
  • 1
Sam Spencer
  • 8,492
  • 12
  • 76
  • 133

8 Answers8

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.

stefat
  • 154
  • 1
  • 4
  • 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? – Lana Miller Aug 04 '12 at 06:24
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.

Sebastian
  • 66
  • 3
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.

vedrano
  • 2,961
  • 1
  • 28
  • 25
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.

YvesLeBorg
  • 9,070
  • 8
  • 35
  • 48
  • 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. – Sam Spencer Jun 02 '12 at 01:33
  • 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. – YvesLeBorg Jun 02 '12 at 02:35
  • I did Code Sign correctly (as far as I know), but would you mind taking a look at my updated question above with edits? – Sam Spencer Jun 15 '12 at 19:27
  • 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. – YvesLeBorg Jun 15 '12 at 19:37
  • 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? – Sam Spencer Jun 15 '12 at 19:56
  • 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. – YvesLeBorg Jun 15 '12 at 20:11
  • 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? – Sam Spencer Jun 15 '12 at 20:55
  • No matter what I do, it ALWAYS results in a Packaging Operation failed error. <--- THIS – Lana Miller Aug 04 '12 at 06:29
1

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

Sergey Kopanev
  • 1,496
  • 3
  • 17
  • 29
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.

jengelsma
  • 8,192
  • 4
  • 21
  • 21
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.

Totoro
  • 3,398
  • 1
  • 24
  • 39
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.

onekiloparsec
  • 2,013
  • 21
  • 32