For some reason Xcode was running an old version of my app on the device. To fix it I deleted the app on my device after trying to reboot everyone. Now Xcode won’t run on the device giving me:
error: failed to launch
No such file or directory (/Users/me/Library/Developer/Xcode/DerivedData/Foo-ebesorzwidboecgphqwmmzabjvoe/Build/Products/Debug-iphoneos/Foo.app/Foo)
EDIT – I added the directory. It is a directory on my Mac. Why would deleting the app from the iphone cause this?
EDIT2 – and its lying because the app is there. Runs fine on simulator.
EDIT3 For those following, or if someone wants to help out:
What is happening is I am changing the version number of the app. At this point it will no longer load the new version number onto the device. So I go to organizer/apps and delete all apps on the device. Then I rerun and get the above error. Restoring the iPhone from scratch is the only way to fix it.
None of the standard reboot everything worked, but after restoring my iPhone as a new phone and NOT going from backup I was able to get it working.