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."
views:
5320answers:
10The 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.
It only worked for me when I removed another unrelated expired provisioning profile from the device. Very weird.
All I needed to do to resolve this problem was reboot my device.
This happened to me after installing an AdHoc distributed app to my device. I had to restore the device to make the debugger work again.
Neither uninstalling/reinstalling the provisioning profile nor re-booting the device (nor cleaning targets, etc.) prevents these crashes for me. : {
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.
To fix this I deleted the last app which I had deployed to the app using xcode and then built my current app again and it worked fine.
For those people who are still getting this error after trying all the above, the following solution just fixed it for me after I was getting the error.
I do jailbroken development, so to bypass mandatory code signing I had modified XCode's Info.plist under /Developer/Platforms/iPhoneOS.platform.
To fix the error, just revert those modifications: replace all instances of XCCodeSignContext with XCiPhoneOSCodeSignContext in that Info.plist file.