How to debug app when launch by push notification in Xcode

dk-obl picture dk-obl · Jul 10, 2014 · Viewed 15.1k times · Source

I am using Xcode 5. I am working with push notifications in iOS. I am getting satisfying results for background mode and foreground mode that can be debugged easily on an iOS device.

But problem is when app is in closed state and launched by push notification tap but I don't know how to debug in this situation. I know the solution for Xcode 4 but not for Xcode 5.

So is there any solution for Xcode 5 and debugging the app when launching it by push notifications? Provide steps to debug in this situation.

Answer

arturdev picture arturdev · Jul 10, 2014

Edit your project scheme and set "Launch" to "Wait for *.app to be launched manually". Then Run the project or hit "cmd+R". Debugging will started, but the app will be not launched. So send your test push notification, and open the app from the push.
Here you go!

enter image description here