程序如果被其它程序启动,那我们如何debug? xcode3在网上有人介绍了,请参见:http://oleb.net/blog/2010/05/how-to-debug-app-launched-by-remote-event/
我在xcode3直试了一下,但没有成功。不知何故,我mbp上装有两个版本的xcode, xcode3与xcode4.
研究了一下,xcode4下却能成功debug被pushNotification或custom URL scheme启动的程序,
首先打开scheme ,如下图:

然后再修改launch选项为:wait for to xxx launch,如下图:

这样当你debug的时候,程序不会运行起来,要等到收到next launch消息的时候就会启动。next launch消息就是push notification 或custom url scheme launch.
本文介绍如何使用Xcode4调试由pushNotification或customURLscheme启动的应用程序。通过设置Scheme并调整launch选项为等待外部启动的方式,使得开发者可以在接收到特定消息时启动应用进行调试。

被折叠的 条评论
为什么被折叠?



