- Home /
What must I do to never see this xCode "Could not launch... No Such File or directory..." error again?
I'm building and running on an iPhone. It compiles fine, it installs fine, it tries to run- and then fails, saying it can't find a file in the derived data folder. I can then manually launch the app on the iPhone with no problems, but xCode doesn't recognize that it's running.
I've found all these possible things that could cause this and ways to hopefully make it go away, usually including throwing out the contents of the DerivedData folder, but it still happens again ALL THE *&^%$#@ TIME and I don't really know what I'm doing to finally get it to go away when it does. It seems like I can build and run a few times with the debugger connected and then it will start giving this stupid error again. Why, xCode? Why?
I have the same problem, encountered it today for the first time. It did not happen to me in previous versions of Unity/Xcode.
In my case, it seemed like the app was copied to the device, but when I ran it, it was an older version. The only workaround for me was to delete the app from the device, and play again. I still got the error, but at least now I got the app to update.
I'm having exactly the same problem - I'm testing on a variety of devices, and now the iPad3 just won't launch from Xcode at all because of this problem. I can run the app, just not from Xcode. Lots of ideas such as cleaning the project, deleting the DerivedData from Xcode or using rm from bash, rebooting the device and the $$anonymous$$ac, etc. but none of these seems to work.
The file mentioned in the error dialog is indeed present - so the "file not found" doesn't make a lot of sense.
Answer by Mike McShaffry · Nov 12, 2012 at 08:24 PM
First, fix the problem causing the dialog. Close Unity and delete ALL of the Unity-iPhone projects in Xcode. Next, make sure you don't have any of the DerivedData directories you see in the error dialog - if you must go into a terminal window or Finder and move them to Trash.
To keep this from happening again follow these steps while you make changes and test your game on a device: 1. Always hit "Stop" in Xcode, and Quit Xcode prior to killing your game on the device. 2. On your device, force quit the game, then delete it. 3. Then, you should be able to go into Unity, make any change you like, and rebuild/rerun the game without seeing the above problem.
I hope that helps you - it sure worked for me!
iPhones have force-quit? That's news to me. How do you do it?
Hold the power button as if turning off. When the slide to shutdown screen comes up, press and hold the Home button. This should force-quit the app. (I learned this when I first started and forgot to tick exit on suspend) : http://osxdaily.com/2012/02/14/force-quit-app-iphone-ipad-ipod-touch/
I was also able to get this problem to go away by plugging in another device. It seems that Xcode can get really confused sometimes!