Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 504
Philip Walton Avatar asked Apr 29 '11 23:04

Philip Walton


5 Answers

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.
like image 162
Philip Walton Avatar answered Nov 17 '22 23:11

Philip Walton


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

like image 42
imort Avatar answered Nov 17 '22 23:11

imort


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

like image 43
Chei Avatar answered Nov 17 '22 23:11

Chei


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.

like image 42
Eric G Avatar answered Nov 17 '22 21:11

Eric G


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.

like image 1
mashimox Avatar answered Nov 17 '22 21:11

mashimox