7

The current issue I'm having is that Build and Archive will build my current target but after it's finished building, a pop-up will appear with the message:

"The operation couldn't be completed. No such file or directory"

I have reinstalled Xcode (3.2.3 with SDK 4.0), rebooted my machine, cleaned the cache, cleaned the project, manually deleted the project build directory. Nothing has worked.

I've also checked ~/Library/MobileDevice/Archived Applications and it is empty.

Any ideas?

p.s. This is driving me crazy!

4
  • 1
    Does it say what file is missing? Does "build and debug" with the otherwise exact same setup produce a working build?
    – Alex Wayne
    Jul 1, 2010 at 22:46
  • Nope, that's all I get. Build and debug works both on the device and on the simulator with the exact same setup. All I'm doing differently is clicking build>build and archive instead of build>build and debug.
    – olivaresF
    Jul 1, 2010 at 23:41
  • I hadn't tested it, but Build and Analyze works with my Debug settings, it's the Release profile that isn't working.
    – olivaresF
    Jul 1, 2010 at 23:53
  • For Xcode 4, this question looks into the issue: stackoverflow.com/questions/5838409/…
    – ThomasW
    Jul 27, 2011 at 4:14

11 Answers 11

18

The error The operation couldn't be completed. No such file or directory also occurs in XCode 4.0 GM preview if you do not change identity to "Don't Re-sign" after selecting (Archives) Share in the Organizer

1
  • This one worked for me. (Generate Debug Symbols was already enabled by default.)
    – zekel
    Dec 27, 2011 at 17:47
6
+50

I had this problem and the solution that was recommended to me was:

  1. Open your Xcode project
  2. Select Unity-iPhone in targets (Double click so it opens the info)
  3. Find "Generate Debug Symbols" and check it on. (Just Search for it in the search field)

This worked for me, but I still don't understand why it was necessary.

2
  • Yes! This actually works. I have absolutely no idea why! If I try it without "Generate Debug Symbols" it gives me the warning, but once it's on, it works flawlessly. Thank you!
    – olivaresF
    Jul 15, 2010 at 2:55
  • Nice find! You should probably report this as a bug to Apple. I think the build & archive trys to package the debug symbols along with the .app so that you can debug crash logs for your app using symbolicate. Their internal script may be expecting these symbols to be generated at all times, so possibly it fails when it can't find the generated symbols.
    – keno
    Jul 15, 2010 at 4:15
3

All answers failed. Best solution, drag the .app bundle to iTunes and reveal the app in Finder. Boom! you get your ipa there.

2

Since it only seems to happen with your release configuration, double check the "Build Locations" values in your project settings for the release configuration.

  • Check the paths in the "build locations" to make sure they exist
  • Check the permissions for those paths
  • Try doing just a build (no archiving) for your release configuration

Also keep an eye on your build results window during the build to see if there were any warnings during the signing and packaging stages that could give you clues

1
  • I've checked and all those locations exist. The permissions seem to be okay. I've already just built the product using release as my configuration and it is working. It's just the build and archive feature that isn't.
    – olivaresF
    Jul 15, 2010 at 2:49
2

Had the same issue and none of the mentions solutions worked. I finally found the problem when I tried to directly sign the app with the adhoc profile: it told me that I had twice a distribution profile in my keychain. I deleted the old one, then compiled again with the dev profile, and then archiving with the adhoc profile and it worked.

1
  • This was the solution that worked for me as well. "No such file or directory" appears to be a really generic error with many different possible causes.
    – RickDT
    Jun 3, 2011 at 15:00
1

Longshot answer - do you have any unusual characters in your project path? This release note indicates it can cause problems:

While most known cases have been taken care of, having a space, comma, slash, backslash, tilde, or other character special to the Unix shell in the directory name of any parent folder of your project can cause your project build to fail in unexpected ways.

1
  • Nope :( The path is: Users/anauel/Desktop/AP/TG/iOSTG so there are no spaces or unusual characters.
    – olivaresF
    Jul 14, 2010 at 17:48
1

If you have a 3:rd party SDK you need to add "$(SDKROOT)/ResourceRules.plist" to the “Code Signing Resource Rules Path” key in the targets build settings.

1

I solved this problem by exchanging the wildcard adhoc distribution profile I was using for an app specific adhoc distribution profile.

0

Of the top of my head, I would check permissions. Some code reports permissions problems as there being no file/folder. Check the Console log. You will sometimes find more info there.

1
  • I currently have read and write permissions to the build folder.
    – olivaresF
    Jul 11, 2010 at 2:09
0

Did you install into /Developer? If you've customized that folder the issue could be that the path contains a space, which could be causing your problem.

3
  • Yes, I've installed in developer. I basically formatted the drive because I installed an SSD and downloaded xCode from Apple.
    – olivaresF
    Jul 13, 2010 at 16:01
  • What's the path to the project? Any odd characters there?
    – Johan Kool
    Jul 14, 2010 at 8:22
  • The path is: Users/anauel/Desktop/AP/TG/iOSTG so there are no spaces or unusual characters.
    – olivaresF
    Jul 14, 2010 at 17:48
0

Run the Console app and see what information is being spit out there. That should give us more insight into the issue.

1
  • Malcolmr just answered it. Thanks, though!
    – olivaresF
    Jul 15, 2010 at 2:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.