Iphone – Finished Running on iPhone

deviceiphonexcode

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?

Best Answer

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.