【发布时间】:2015-04-17 12:50:59
【问题描述】:
iOS 版 Gmail 应用能够在应用未运行时接收推送通知(与大多数电子邮件应用一样)。
但是,当用户收件箱的未读计数变为零时,它也能够清除设备中的所有 Gmail 推送通知,即使应用程序没有运行。
这是一个示例序列: 1. 在您的 Gmail 帐户中接收新电子邮件。 2. iOS 设备显示新消息通知。 3. 转到 Gmail 网站并打开邮件(将邮件标记为“已读”)。 4. iOS 设备上的通知被关闭。
注意:[[UIApplication sharedApplication] scheduledLocalNotifications] 仅提供本地通知,即在 iOS 应用程序本身中创建的通知。
就 Apple 的documentation for APNS 所描述的,没有办法remotely launch an app into the background,也没有办法关闭远程通知。
那么,Gmail iOS 应用是如何实现这一点的呢?
【问题讨论】:
标签: objective-c iphone push-notification apple-push-notifications