3

Developing an iPhone application on Xcode 4.5.2. Device: iPhone 4.

I was preparing my application for sending it to someone through testflight. I created a distribution profile and certificate for this. I did it following this: https://stackoverflow.com/a/11917884/555690

Anyway, recently, Xcode is unable to launch my project. When I press Run, it will successfully build and copy the files to the device, but when attempting to launch it, it will send an error:

Error launching remote program: No such file or directory (/Users/Me/Library/Developer/Xcode/DerivedData/MyGame-xxxxxxxxxxxxxxx/Build/Products/Debug-iphoneos/MyGame.app/MyGame).

I'm not sure why is this happening.

A very similar question is this: Xcode successfully builds my target, but does not run the product, however, it seems to be more oriented to OSX instead of iOS, and the solutions there haven't helped me either. Also, I do get an error (he doesn't get an error).

If I run the app in the device (without Xcode), it works fine.

Community
  • 1
  • 1
Saturn
  • 17,888
  • 49
  • 145
  • 271
  • Did you try cleaning the project and removing the derived data folder? – DrummerB Jan 21 '13 at 21:11
  • I also have similar issue, dunno I was never able to debug on device. But my application was approved by Apple and now is live. I am also waiting for this question to be answered.. – P.J Jan 21 '13 at 21:12
  • @DrummerB: Yes, the problem persists. – Saturn Jan 21 '13 at 21:23

1 Answers1

2

Yes, this happens a lot in the new Xcode.

One recipe that should work is:

  • disconnect the device from computer
  • delete app from device
  • reset the device

  • quit the xcode (not just by closing the project, quit the program)

  • in Finder go to ~/Library/Developer/Xcode/DerivedData (Library folder is hidden: you can open Finder->Go->Go to Folder...)

  • delete all subfolders there

  • empty the trash

  • reconnect the device

  • open the project

  • now you should be able to run the app on the device again

Rok Jarc
  • 18,765
  • 9
  • 69
  • 124