I\'m running Xcode, trying to get my app to run on my iphone. I\'m getting the error message \"the program being debugged is not being run.\"
It only worked for me when I removed another unrelated expired provisioning profile from the device. Very weird.
The solution was to remove my developer provisioning profiles from my phone using Xcode's organizer window while my phone was connected to my computer, then to re-add my developer provisioning profile, which I re-downloaded from developer.apple.com.
I have two developer identities (work and home) and use the same device for development. I also use a wildcard app identifier (xxxxxxxxxx.*) at home, and I often build different apps using the same profile. Sometimes when I switch locations (e.g. from work to home) I get the above error.
Removing and re-adding the developer profiles from the device, reloading the profile from Apple and restarting the device (in various combinations) did not solve the issue for me.
What did enable running and debugging on the device again was:
(I also quit Xcode and did rm -rf build
, but that is probably not needed).
The other suggestions didn't work for me either.
It started working after I changed the "application-identifier" in the Entitlements.plist to the App Id found in the Provisioning Profile. The default was $(AppIdentifierPrefix)$(CFBundleIdentifier) which I changed to "H2GC99UNHN.au.com.mydomain.myappname".
The Xcode default: $(AppIdentifierPrefix)$(CFBundleIdentifier) would work if those variables resolved correctly. CFBundleIdentifier refers to the "Bundle identifier" in your Info.plist. I never found out where to set the AppIdentifierPrefix which should be something like H2GC99UNHN.
To find your App ID in Xcode go to the Window menu, then Organizer. Click on the correct Ad Hoc provisioning profile, the App Identifier is one of the properties.
PS: To get the app on my device for testing I am using "Build and Run" in Xcode (I don't know any better). But the run part will fail because I have removed debugging symbols in my Beta configuration. Just let the run part fail and then reopen the app manually.
This error makes sense if the signed app is linked to the profile and it's certificate via the app id.
Ah, latest version: I have Core-Plot framework included in my project. My old development profile expired and I dowloaded new profile, changed the project with the latest profile, but I had this error anyway.
So, I needed to open Core-Plot framework project itself, change code signing there to latest profile, build it, go back to my original project, rebuild it and then everything started working fine again.
I just had to power off my iPhone device and restart the same.
I tried in this order:
Only 3. worked for me.
imp: My Provisoning profiles are valid for almost a year and there was no reason for them to expire (I even cross-checked them to be doubly sure :)). If this hadn't work, I would have checked - as someone rightly suggested, if Developer provisioning profile was being used - which was, in my case.