Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Debug an iPhone App after an ad Hoc Build?

I did a ad Hoc Distribution of my App now i want to to Debug it again (i have changed something with CoreData) but i cant.

If i press Debug unsing the Settings for Distribution the Default picture starts on the device but i get an error "Error form Debuger: The programm being debugged is not being run.".

If i use the Debug Settings i get an other Error: "The Executeable was signed with invalid entitlements."

What do i have to do to be able to Debug again?

like image 869
mabstrei Avatar asked Jan 24 '11 13:01

mabstrei


2 Answers

You need to change the "Code Signing Identity" setting for your app target in XCode back to "iPhone Development", with the relevant certificate for your app. Only apps signed with development provisioning can be debugged.

Note that the target's setting (below the "Targets" node in the tree of "Groups & Files") overrides the global project's setting, so if you've already changed the latter, make sure the target isn't still set to "iPhone Distribution".

You can find these settings by right-clicking/ctrl-clicking the respective tree node and selecting "Get Info".

Finally, make sure you actually build the app with the new settings (Build & Debug/Build & Run is fine) to re-sign the binary.

like image 120
pmdj Avatar answered Oct 29 '22 17:10

pmdj


In addition to making sure your current Debug build is using the correct Developer certificate, you might want to un-select the entitlements.plist in your non-Ad-Hoc Target's file inclusion pane if you have one.

If that still doesn't work, deleting the Ad Hoc certificate and app from your iPhone, rebooting it, restarting Xcode, and installing a clean build sometimes causes a borked debugger connection to start working again.

like image 39
hotpaw2 Avatar answered Oct 29 '22 16:10

hotpaw2