Andrew
Andrew

Reputation: 966

Xcode Error launching remote program

I've seen this all over the place on stack overflow, but everyone else's solution doesn't work for me. Help! Please!

I'm trying to test my app on my iPhone, it's run perfectly fine up until I updated Xcode and the iOS (I've also been on v4 though). I can't get it to sync the app over at all. I've tried dumping this file/folder, dumping caches, quitting relaunching Xcode, Rebooting the Computer, Restarting the phone, everything I can think of to no avail. Any Ideas?

Error launching remote program: No such file or directory
(/Users/andrew/Library/Developer/Xcode/DerivedData/BTC_Exchange-drzeigaqfnjtatglpppiwxmscsoj/Build/Products/Debug-iphoneos/BTC Exchange.app/BTC Exchange).

And the file does exist, there are no permissions issues from what I can tell and I ran a whole disk permissions check too.

Upvotes: 17

Views: 13375

Answers (14)

E-Riddie
E-Riddie

Reputation: 14780

Issue

This usually happens when you run multiple projects which have stored their data at derived data, and therefore Xcode becomes a mess sometimes for different reasons, usually indexing a project to two different Workspaces

Solution

Follow these steps to get out of the mess :

  1. Quit Xcode if it is opened
  2. Go to derived data's folder located at ~/Library/Developer/Xcode/DerivedData
  3. Delete everything on that folder (Also empty the trash)
  4. Open up Xcode and do a Product Clean by pressing Command-Shift-K
  5. Run your project and everything will be back to normal

Background

With Xcode 4 came the concept of a workspace that allows multiple projects to be grouped together. Each workspace gets a unique set of symbol indexes, build products, window layouts, etc., otherwise referred to by Xcode as derived data

Upvotes: 1

user1742230
user1742230

Reputation: 1

I recently ran into this problem on Xcode 4.4.1, with an old iPod 3G running iOS 4.2.1.

My application requires iMessage, so I had added a UIRequiredDeviceCapabilities entry 'sms' to the app-Info.plist.

I updated my app code to check the device for the SMS class functionality (MFMessageComposeViewController) before executing it, and I removed the 'sms' key. So, when testing my code on older devices, to see if it worked, I stumbled onto this error one time when I re-added the app-Info.plist 'sms' key.

Now get this: With my app on an older device (no 'sms' key), I can add or remove the 'sms' key and Xcode has no problem cleaning/building/running; but if I delete the app from the device and then clean/build/run, Xcode complains about the directory not existing (and it's actually there), until I remove the pesky 'sms' key.

I hope this makes sense and can help somebody.

Upvotes: 0

Chris Fox
Chris Fox

Reputation: 641

I am seeing the same error and while I don't have any new solution to add, I would like to point out in the path above, and in the path I am seeing in my own case, there is a malformed file string:

/Users/{user}/..../appname.app*/appname*

This is the real problem. And there is no such entry in any project file

Upvotes: 0

tranvv
tranvv

Reputation: 11

Just wanted to put my own solution here since this has been happening to me non-stop!

  • close xcode
  • delete the derived data folder
  • unplug and restart the device
  • then re-open xcode and power on and reconnect the device

that has been working for me. These steps individually have never worked for me so I just do them all.

Upvotes: 0

Vyacheslav Dulnev
Vyacheslav Dulnev

Reputation: 1

Such problems happens for me when I tried to run application on IPhone 3g using XCode 4.4.1 (4F1003). Gabriel's solution help me find out what is wrong - in UIRequiredDeviceCapabilities was "armv7" value, I changed it to "armv6" and error disappeared.

Upvotes: 0

Gabriel Centenaro
Gabriel Centenaro

Reputation: 1

Since none of the answers above worked for me, i've decided to share what i've found out.

My problem was the UIRequiredDeviceCapabilities values on the Info.plist file. I added they key gps when what I needed was location-services, since my app is supposed to work not only for iPhone, but for iPod touch as well. When I tried to debug it on the Simulator it all ran just fine, but on the iPod touch that I use for debugging I kept getting that stupid message.

Hope my answer helps someone :)

Upvotes: 0

Matt.M
Matt.M

Reputation: 1148

I was having the exact same issue as you. I tried everything you did, and just like you none of those solutions worked for me. Just now I was finally able to get it to work (whew). Here is how I did it:

  1. Rename your project to anything different. Do this in Xcode 4 by slowly double clicking on the project name in the Project Navigator.

  2. Go to your project info.plist. Change the bundle identifier to match the new project name. Also change the bundle name just to be safe...

  3. Do a command-shift-k to clean the project. Then run!

That worked for me. Good luck.

Upvotes: 5

MadNik
MadNik

Reputation: 7793

Go : ~/Library/Developer/Xcode/DerivedData

Clear user Data

Clean the Project

Quit the xcode(make sure you quite. Look at the picture)

   ![Quit xCode][1]

enter image description here

Upvotes: 4

Peter_from_NYC
Peter_from_NYC

Reputation: 309

Getting rid of DerivedData and restarting Xcode worked.

It was the suggestion of Dave Wood Feb 17 at 8:20

"Try to clear ~/Library/Developer/Xcode/DerivedData and RESTART Xcode."

In my case, I had about 7 different "DerivedData"s, which I found by doing a search of DerivedData in finder and deleting them all, closing Xcode, and rebooting.

Thank you.

Upvotes: 1

Ryan Bavetta
Ryan Bavetta

Reputation: 865

For me, doing Product -> Clean then restarting XCode worked.

Upvotes: 1

Himanshu Agnihotri
Himanshu Agnihotri

Reputation: 2360

Please quit the xcode and then start it works fine with me. :)

Upvotes: 0

Flanker
Flanker

Reputation: 81

Try to clear ~/Library/Developer/Xcode/DerivedData and RESTART Xcode.

Upvotes: 8

Dave Wood
Dave Wood

Reputation: 13333

Go here: ~/Library/Developer/Xcode/DerivedData and clear out all the old builds. It'll work again without having to do the project renaming etc.

Upvotes: 20

SimplyKiwi
SimplyKiwi

Reputation: 12444

I would use the normal Xcode for the non-GM release and also the non-GM iPhone OS. Also I would try to reboot your device if you haven't tried that already. Make sure all the software on your computer is updated too. I am using all of the latest stuff and I have no issues on iOS 5.

Upvotes: 0

Related Questions