Wert1go
Wert1go

Reputation: 297

Xcode 4.3.1 - Packaging operation failed

Packaging operation failed - this message now showing while i try to make .ipa file for Ad Hoc distribution in Organizer

I checked certificates, checked project directories (after reading this)

Xcode dont showing any errors or something similar. Log Navigator show no errors (only old warnings).

So here is question: anyone else encountered a similar problem? And if answer is positive any suggestion to solve problem?

P.S.: in Xcode 4.2.1 all perfectly works

Upvotes: 14

Views: 7379

Answers (16)

Cordeiro
Cordeiro

Reputation: 21

I installed Xcode 4.3.1 to compile an app for iOS4.2 but I couldn't solve the "Packaging operation failed" problem (I've tried some of the solutions mention above). Later I installed XCode4.4.1 and I was able to compiled for iOS 4.2 without (almost any) problems

Upvotes: 0

Zsolt
Zsolt

Reputation: 3760

my problem was that I entered a Product Name containing the tilde character: "~xxx~" it was a temporary build I thought I would highlight it but in the end you cannot use any character in the product name. Hope this helps.

Upvotes: 0

iDaniel89
iDaniel89

Reputation: 65

I solve it just copying the project folder into the desktop, which (i think) shortened the project file path.

Upvotes: 0

Harin
Harin

Reputation: 867

I had same problem in my project (in xcode 4.3.2) And as per all ans I checked for any png file starting with "._*" and also checked folder and its subfolder are different name.

Also checked code signing identity as per requirement. But Not Succeeded to solve this problem.

After hole days effort finally I got reason for "Packaging operation failed" error in my project.

In my case,I have classed "About_us.h" and "About_us.m" and by mistake I import header file like #import "About Us.h" (white space in middle). So when I loaded app on Device it will successfully loaded but when I try to create ipa using archive its give me error and return me Estimated App Store Size just 143 kb.

Finally while I change header like #import "About_Us.h" and try to make ipa I got real size in proper MB.

Hope this will help someone.

Upvotes: 5

Nick
Nick

Reputation: 9860

Occasionally this is caused during automatic resigning during packaging with a different distribution certificate. This can occur when you start a new project and you're building both dev and release builds with your Team Provisioning profile, then you create a distribution (ad hoc or otherwise) certificate for this specific bundle ID and attempt to sign the archive with that new certificate.

The fix is to dig inside your build settings for the code signing identity and set the build release identity to the same distribution certificate that you're attempting to sign your archive with, either your ad hoc or app store certificate. You can leave debug builds as your team cert.

In the below example, the problem has been fixed. Use the build settings search box to look for the code signing identity. "Release" is probably set to "iOS Team Provisioning Profile" when it should be set to "iPhone Developer: Your Name" which is the same certificate you're trying to sign your archive with.

code signing

Upvotes: 21

viggio24
viggio24

Reputation: 12366

In my case I had two issues: 1. the bundle ID was slightly different between the one in the Info.plist and the one used in the iTunesConnect 2. the distribution certificate used for archive creation was not the same that I used to resign the app before validation/submission.

In all cases XCode was opaque. But using Application Loader (you can run it from "XCode menu --> Developer tools") and providing it with the ipa file, the messages were clear enough to help me debugging the issue. So I'm going to radar this to apple: give the user clear messages in XCode exactly as you do with Application Loader! in the meantime, I recommend to use Application Loader when the "package" issue is not clear enough.

Upvotes: 0

tapmonkey
tapmonkey

Reputation: 141

I had the same problem in a cordova project, but I could not find any png files starting with '._'. With some luck I found out that the problem for me was that there was some font folder with an icon in the www (blue) folder (www folder is the folder containing the webapp and will be bundled when building). After removing (moved the fonts a level higher) the message 'packaging operation failed' was gone and exporting the archive for Ad Hoc distribution worked again.

Upvotes: 0

sridvijay
sridvijay

Reputation: 1526

I had an issue with my icons or atleast that's what I think. I had to delete the icons and delete the references in my info.plist file. Then after that magically, a option while selecting to distribute the app in the Xcode Organizer came up saying Don't Re-Sign, and after I did that BOOM! It worked! Good Luck for Future Visitors!

Upvotes: 0

Jacque
Jacque

Reputation: 820

I had the same issue in conjunction with a custom directory-icon. Those are stored as a hidden file (named Icon?) inside the affected folder.

It's probably safe to assume that there is a bunch of desktop/fs-features and conventions which can lead to packaging problems.

Upvotes: 0

sviftrup
sviftrup

Reputation: 11

I had a file that contained ^ in the terminal that was the problem.

When looked at in Finder there was no visual clue that it was not labeled correctly. However when I tried to rename it, it failed.

Upvotes: 0

frank
frank

Reputation: 11

In case some file has space in file name which will stop the rm process. use this command instead.

find . -name \._*.* | xargs -I{} rm -v {}

Upvotes: 1

Phil Loden
Phil Loden

Reputation: 1434

Issue for me was that release Product Name was set twice under Build Settings:

ProductName
ProductName

instead of just ProductName. Interestingly, the newline caused issues for packaging, but nothing else.

Upvotes: 1

Taras Kalapun
Taras Kalapun

Reputation: 1761

I had this issue after copying my project on a flash drive with FAT filesystem. Suddenly there appeared a lot of "._" files. One of such files was in Settings.bundle. I removed these files running

find . -name "._*" -exec rm -rf {} \;

Upvotes: 3

Keith Rumjahn
Keith Rumjahn

Reputation: 461

I've managed to fix my issue. Here's how I did it. I went to terminal, typed in defaults write com.apple.finder AppleShowAllFiles TRUE

Then I checked all the folders with images in them. I found that some of my images had ? infront of the name even though it looks ok in the finder, it showed in the terminal.

So I just renamed it and was able to submit the app.

Note: Check the estimated size of the app in the organizer. If it's way off, it's messed up.

Upvotes: 0

malaki1974
malaki1974

Reputation: 1623

Same issues for me. No folder within a folder, no ._ files, no warnings or errors etc. Archives fine, but when I try to package with the organizer to adhoc it fails and says it is 9kb.

Upvotes: 0

Samuel
Samuel

Reputation: 56

I get the same problem.

PNG files starting by ._ are not visible, even if you display hidden files in Finder (defaults write com.apple.finder AppleShowAllFiles 1 in Terminal) But if I browse my SVN folder using Versions app, I can see there are PNG files starting by ._

For each of these files, I opened it with Preview app, duplicated and re-saved with the same name, then I removed all the ._ files because they are no longer needed.

Now I can create an archive and distribute it through an IPA file.

I hope this will help you!

Upvotes: 3

Related Questions