如何在临时构建后调试 iPhone 应用程序?
我对我的应用程序进行了临时分发,现在我想再次调试它(我已经使用 CoreData 更改了一些内容),但我不能。
如果我按调试取消分发设置,默认图片将在设备上启动,但我收到错误“调试器错误:正在调试的程序未运行。”。
如果我使用调试设置,我会收到另一个错误:“可执行文件已使用无效权利进行签名。”
我需要做什么才能再次调试?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要将 XCode 中应用程序目标的“代码签名身份”设置更改回“iPhone 开发”,并使用应用程序的相关证书。只有使用开发配置签名的应用程序才能进行调试。
请注意,目标的设置(位于“组和文件”树中的“目标”节点下方)会覆盖全局项目的设置,因此,如果您已经更改了后者,请确保目标未仍设置为“ iPhone 分销”。
您可以通过右键单击/按住 Ctrl 键单击相应的树节点并选择“获取信息”来找到这些设置。
最后,确保您实际上使用新设置构建应用程序(构建和调试/构建和运行即可)以重新签署二进制文件。
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.
除了确保当前的调试版本使用正确的开发人员证书之外,您可能还需要在非临时目标的文件包含窗格中取消选择 entitlements.plist(如果有)。
如果仍然不起作用,请从 iPhone 中删除 Ad Hoc 证书和应用程序,重新启动 iPhone,重新启动 Xcode,然后安装一个干净的版本,有时会导致中断的调试器连接重新开始工作。
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.