Finished Running on iPhone

32,055

Solution 1

The connection that XCode creates with the device is rather fragile, and can easily be corrupted if anything goes amiss in the debugging test, most commonly if the developer stops a build, while it is being moved to the device.

I have a routine of things I go through, when this occurs. If one doesn't work, I go further down the list.

  • Check your signing certificates : This error can occur if you mess around with the certificates too much. Make sure your current scheme uses the Debug signing when making a debug build, and check in your application settings if the current debug signing certificate is a debug certificate. (Not AppStore, AdHoc or Enterprise).

  • Reestablish connection with the device : Look under devices in your Organizer. Check if the device you are using is present and marked with a green bullet. If orange or grey, reconnect the device with the USB. For precaution, wait a couple of seconds from taking the cable out before you insert it. It should make no difference if you eject the cable from your mac, or the part connecting your iDevice.

  • Reactivate development on the iDevice : Being unaware why this happends, some devices revert to a non-development stage from time to time. Clicking the "Enable development" under Organizer > Devices seems to clear this off.

  • Flushing XCode device connections : Something that often is needed, you can simply shut down XCode (and to be safe, close the iPhone simulator as well) and start it up anew. Deleting the debug application present on the iDevice is also a good idea.

  • Restart your iDevice : Tedious as it might seem, restarting your iDevice is sometimes needed, since the pipe held on the device might be corrupted.

  • Restarting your developer machine : If everything else fails, a restart of your mac is often required. I have never experienced this error without having it fixed by now.

I hope this checklist will help you through.

Solution 2

Try cleaning the project. SHIFT+CMD+K

Solution 3

Found the same bug in XCode 9 while running the project on iPhone 5s. Clean the project and it will work.

Solution 4

  1. Clean.
  2. Build.
  3. Run.

It's work for me.

Share:
32,055
Lolloz89
Author by

Lolloz89

Newbie iPhone and iPad developer, graduated in Computer Engineering at the Modena and Reggio Emilia University.

Updated on June 04, 2020

Comments

  • Lolloz89
    Lolloz89 about 4 years

    I am trying to test my app on an iPhone 4S. When I build and run from Xcode, the project is successfully compiled but after that Xcode says:

    Finished running MyApp.app on MyiPhone

    The app perfectly work on the simulator and the provisioning profile works correctly (I tried to load an empty app and it works).

    If I try to manually load the app I get this message:

    The Info.plist for application at /Users/*/Documents/App/AppName/DerivedData/AppName/Build/Products/Release-iphoneos/AppName.app specifies a CFBundleExecutable of AppName, which does not exist.

    Where is the problem?

  • Lolloz89
    Lolloz89 about 12 years
    I already removed the required device capability on the info.plist.
  • Lolloz89
    Lolloz89 about 12 years
    I ended up starting a new project and copying the old classes in the new one. I added the gamekit too, but now the app runs normally..
  • ObjectiveLee
    ObjectiveLee about 12 years
    I found my problem. The app had the same issue on all devices. Fortunately I didn't end up building a new project from scratch. Somewhere along the line, the entry "gamekit" in Info.plist became "gameKit". Any misspelled required device capability in Info.plist causes the load to fail without an error. Just add a junk capability such as "junk" and you can recreate it.
  • Chris Klingler
    Chris Klingler almost 7 years
    For me I just had to open my Devices window and XCode quickly resolved its issue and said the phone was good to go