XCode 4 Archive/IPA Error: "The operation couldn’t be completed. No such file or directory"
Asked Answered
C

6

17

I've found various proposed solutions to this problem on this internet, but none of them work for me. Does anyone know why this might be happening?

http://answers.unity3d.com/questions/15294/xcode-build-and-archive-error-no-such-file-or-directory

http://blog.joshschumacher.com/2011/04/06/xcode4-the-operation-couldn%E2%80%99t-be-completed-no-such-file-or-directory/

I've tried archiving with every combination of coding signing vs not using code signing, and I've tried using every combination of provisioning profiles, but I still get the same error every time.

I'm very confused as to why I'd even be getting an error like this when trying to save a file. I'm using XCode 4, my application builds for archive fine. In fact, I can even upload my application to itunesconnect (and it was accepted!). I just can't create an IPA for sharing and beta testing before submission.

Any ideas?

The error message The Error

Right before I get the error Right before I get the error

Canopy answered 29/4, 2011 at 23:38 Comment(7)
I'm having this error too. Anyone have any ideas? I'm on Xcode 4.0.2Bespeak
W Dyson, are you using three20 by any chance? I am, and I'm wondering if there could be a connection since it seems so few other people are having this issue.Canopy
No. And the app runs correctly in the Simulator and on the iPhone. When I installed 4.0.2, I didn't install command line tools, could this be the problem?Bespeak
I too can run the app fine on my device and in the simulator. I just created a brand new app in XCode, added absolutely none of my own code, and I get the same problem. It's starting to look more and more like a bug.Canopy
Make sure you use AdHoc profile, that's the only thing that comes up to mind right nowCatholicize
@Nick, thanks for the suggestion, but I've used every combination of all configurations and profiles, including my AdHoc profile.Canopy
I think this is a bug in 4.0.2. I had no problems with 4.0.1.Bespeak
C
11

After much frustration, I filed a developer support request with Apple. The technician I spoke with was able to save my archive as an .ipa on her computer -- the exact same archive that I was not able to save on mine, which pointed to a possible bug in my system (and from the sounds of it, many other people's).

She recommended that I uninstall and reinstall XCode and the developer tools, and that worked!

Here were her uninstall instructions:

  • Make sure that your machine is running the latest Mac OS X (10.6.7) and iTunes.
  • Run the following command in the Terminal application to uninstall your SKD: sudo <Xcode>/Library/uninstall-devtools --mode=all (where <Xcode> is the path to the directory that contains your SDK.)
  • Drag your <Xcode> to the trash and restart your machine
  • Re-download and install Xcode (4.0.2) from the iOS Dev Center. Make sure that the System Tools, UNIX Development, Essentials packages in the Custom Install pane are selected before installing it.
Canopy answered 4/5, 2011 at 20:10 Comment(3)
I got this error too after restoring my system from a time machine backup. This answer led me in the right direction. ThanksParallax
I got this error too. I hadn't selected to install the UNIX development tools when installing XCode4. I reinstalled XCode4 (without uninstalling), this time with all options selected, and it fixed the problem. Thanks!Suchta
This also happens if you install pre-release versions of XCode in a different directory, and then subsequently remove them (because you now realize you should not have put it on a production machine :-) ) A reinstall (or, strangely, in my case... 2) takes care of the problem.Abhor
F
5

I have the same issue after my distribution certificate was expired. I add new ones (private key and certificate) and xCode "Share" command starts to produce such error.

The problem resolves as soon as I remove old private key & certificate from Keychain Access. Hope it helps

From answered 6/5, 2011 at 8:38 Comment(1)
That solved it for me too, I had the same symptoms as reported by OP, but with your scenario.Fleetwood
P
4

Selecting "Don't Re-sign" at Identity solved the same issue for me.

Pomeroy answered 27/6, 2011 at 9:30 Comment(2)
This also solved it for me - I recommend trying this first before reinstalling.Eclectic
where do you select Dont Re-sign?Nonaligned
B
1

I actually had the same problem, but a different solution (and reason). I had Xcode 3 and Xcode 4 both running at one point. I recently deleted Xcode 3 and moved my Xcode 4 from /Xcode4 to /Developer directory. This caused me to have the same issue you describe.

I moved the directory back to /Xcode4 and now my archives save out correctly.

Bluenose answered 7/6, 2011 at 19:48 Comment(0)
C
1

I also had the same problem but I could resolve the problem in the below way.

My project was on the portable disk (formatted as FAT-32) and the project referred some folders on the same disk as "add folder reference for any added folder". I could build it any configurations however I couldn't just make .ipa file with above alert.

So, I copied the referenced folders on the portable disk to the desktop of the disk installed XCode (MacOS). And adding again the folders into the project. I could make .ipa file.

Chloride answered 6/7, 2011 at 7:43 Comment(0)
M
0

I installed Xcode 4.0.2 in one directory and then manually moved it to another. When I moved Xcode back to the first directory everything worked.

Moralez answered 1/11, 2011 at 11:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.