【发布时间】:2016-10-22 11:53:22
【问题描述】:
苹果文档Getting the User’s Attention While in the Background 说
通知是暂停应用的一种方式,它位于 背景,或者没有运行以引起用户的注意。
由于区域监控和is in the background,我的应用被 iOS 唤醒并发布本地通知。用户点击通知,应用程序将在前台。
由于用户点击了通知,如何确定应用进入前台?
哪个委托方法将包含通知信息。
didFinishLaunchingWithOption or didReceiveLocalNotification
【问题讨论】:
-
如果应用程序被挂起并且没有运行,那么应用程序将调用“didFinishLaunchingWithOption”,如果应用程序在后台运行,那么您将在“didReceiveLocalNotification”中收到通知信息。
标签: ios objective-c appdelegate region-monitoring