Xcode will run app on simulator but not on device

62,383

Solution 1

With Mountain Lion and the latest version of Xcode (4.4.4F250), none of the suggestions in this thread worked directly (clean, clean project, remove derived data folder, etc). This sequence did. From DhilipSiva:

  1. Disconnect your device
  2. Delete the app from your device
  3. Quit Xcode (Don't just simply close the window, quit it)
  4. Delete derived data folder rm -fr ~/Library/Developer/Xcode/DerivedData (console)
  5. Start Xcode,connect device & run the project

Solution 2

I solve this by going to Targets-> Info -> Required Device capabilities and delete the option with armv7.

Hope this helps!

Solution 3

This is a recurring problem that many developers are having with the current version of Xcode. The temporary workaround has been consistently deleting the DerivedData folder.

You can add doing it to a build script or even make it a cron job:

rm -rf ~/Library/Developer/Xcode/DerivedData

Sad, but true.

Solution 4

For me restarting of Xcode, cleaning DerivedData and restaring device wasn't enough in most cases, until I had figured out that iTunes was also running, and after quitting iTunes everything worked fine!

So my steps now are simple:

1. Quit Xcode.
2. If iTunes is running, quit iTunes.
3. Reopen project.

No need to remove app from the device, clean project or restart/disconnect device. I think that's because Xcode and iTunes use some common libraries (as you know, Xcode Installer always asks to quit iTunes on installing iOS SDK).

Solution 5

I also had this problem after changing from a lower XCode and iOS version to the current XCode and iOS version.

I fixed this problem by changing th iOS Depolyment Target to a lower version, since my Device is not updated to the latest iOS yet. You can do this by clicking the project inside the Info tab.

Share:
62,383
Rahul Iyer
Author by

Rahul Iyer

Hello, If you're stuck on any kind of engineering / programming problem (it doesn't matter what language or technology) feel free to ask me to take a look at it. : https://www.rahuliyer.com/contact Rahul https://www.buymeacoffee.com/rahuliyer

Updated on July 09, 2022

Comments

  • Rahul Iyer
    Rahul Iyer almost 2 years

    I receive the following error when trying to run the app on my device.

    error: failed to launch '/Users/michael/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphoneos/Word Processor.app/Word Processor' -- No such file or directory (/Users/michael/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphoneos/Word Processor.app/Word Processor)
    

    The app runs fine in the simulator. When I try to debug on the device, it appears to copy the app (I can see the icon), but then stalls with the above message. Xcode says it is running the app on my iPod, but nothing is happening on my iPod.

    When I click on the app, the app appears to launch, but seems to be missing resources. Other projects of mine work properly. What setting do I need to change to make this work properly.? Looking at the error message, it seems to be looking in my mac for the app. But this doesn't make sense since I am trying to run it on my 4th gen iPod touch. I am using Xcode 4.3.1 and iOS 5.1