Xcode4如何debug被pushNotification或custom URL scheme启动的程序
程序如果被其它程序启动,那我们如何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.