Search code examples
objective-cxcodexcode4

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


Solution

  • 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.