When i try to launch my application from Xcode to the device, i get this error:
error: failed to launch \'/Users/Luca/Library/Developer/Xcode/DerivedData/myapp-b
I just wanted to add one more tip to prevent this from happening:
DO NOT detach your physical device before you hit the stop debugging button from xCode. This is actually the most common case after which I met the "could not launch" issue. In my case, 80% of the issue is caused by this... just accidentally detached the device during debugging...
Keep in mind. :P