20
votes

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?

11
I know you already checked your provisioning profile but check your code signing section and make sure you have the developer provisioning profile in debug. I had this happened to me and I accidentally had my ad hoc distribution provisioning profile in the debug.atbebtg
If you mean the Build Settings entry "Code Signing Identity", is correctly set to the correct provisioning profile...Lolloz89
have you tried another phone/device?nycynik

11 Answers

22
votes

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.

7
votes

Try cleaning the project. SHIFT+CMD+K

1
votes

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

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

It's work for me.

0
votes

I had similar issue. When I run program on iPad2 it compiles and installs app on device, wait for some time, and display an alert. Then I followed steps below

1) Removed that application from device.

2) Disconnected iPad and tried again.

Then it successfully run in device. If this not resolved your issue, do

Rename your application to some thing else and try to run. It will run. Lastly you can make an "ipa" file with Ad Hod distribution and can test on device.

0
votes

Looks like you are trying to run a release product on the device. You are probably signing it with production key. Run it as debug.

0
votes

Maybe I'm totally off with this guess but the last time I got the same message was when I had some required hardware capabilities set in the Info.plist which the target device didn't comply with. (E.g. requiring a camera and trying to run the app on an iPad1.)

0
votes

I've just finished chasing down a similar problem.

An app that worked on the device (iPad 1) and on the simulator stopped loading on the iPad but continued to function as before on the simulator. When "run" with the device as target, it compiles and then goes immediately to "Finished Running...".

I did all the usual bits - removed the app from the device, ran Product/Clean, removed derived data, shut computer and device down cold, but with no luck. Other development apps loaded and ran fine.

This app uses GameKit. When I removed the gameKit requirement from Info.plist, the app loaded and ran correctly on the device again - including the GameKit functionality (no kidding). When I added gameKit back in, it failed again. When I added the gameKit requirement to other apps, they failed to load to the device as well. It appears that something has happened to the gameKit setting on the device, although gameKit is there and functions as always. I'm suspicious that this one has to do with the state of the sandbox.

I've got to make a few changes to get the app running on the iPhone and I'll test that as well. I'll repost if I sort it out.

0
votes

Si it seems that XCode build, ran and finished but the app failed to be deployed and was not even copied to the device.

In fact, there should be something in the XCode project that is broken. This is easily corrupted. The best move is to build a new project from scratch. Don't forget to add armv6 support if needed.

It works well for me!

0
votes

Check the device log

It may occur, that you are using a provisioning profile, which does not allow one of the entitlements, listed for your target.

For example

entitlement 'entitlement-name' has value not permitted by provisioning profile 'Your Profile Name'

0
votes

For me, the usual culprit is that I have an app store build already on my device.

Different/same version numbers might make things worse. I haven't looked into it too deeply since deleting the version that is already on my device usually fixes the issue.