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

隐身守侯 提交于 2019-12-04 18:54:25

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/4782266/how-to-debug-an-iphone-app-after-an-ad-hoc-build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!