如何在 Xcode 中通过推送通知启动时调试应用程序 [英] How to debug app when launch by push notification in Xcode

查看:36
本文介绍了如何在 Xcode 中通过推送通知启动时调试应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Xcode 5.我正在 iOS 中处理推送通知.对于可以在 iOS 设备上轻松调试的后台模式和前台模式,我得到了令人满意的结果.

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.

但问题是当应用程序处于关闭状态并通过推送通知点击启动时,但我不知道在这种情况下如何调试.我知道 Xcode 4 的解决方案,但不知道 Xcode 5 的解决方案.

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.

那么在通过推送通知启动应用程序时,有没有针对 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.

推荐答案

编辑您的项目方案并设置Launch"以等待 *.app 手动启动".然后运行项目或点击cmd+R".应用程序不会自动启动,但调试器会在应用程序启动后立即附加到进程中.所以发送您的测试推送通知,并从推送中启动应用程序.
给你!

Edit your project scheme and set "Launch" to "Wait for *.app to be launched manually". Then Run the project or hit "cmd+R". The app will not be launched automatically, but the debugger will attach to the process as soon as the app launches. So send your test push notification, and launch the app from the push.
Here you go!

这篇关于如何在 Xcode 中通过推送通知启动时调试应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆