【发布时间】:2016-12-21 08:36:10
【问题描述】:
是否可以在未按下通知的情况下终止应用程序时接收通知数据?
我正在使用
func application( _ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any]) {}
如果应用程序处于前台或后台,它可以正常工作,但如果应用程序终止则没有效果,所以我的问题是如果应用程序终止,是否可以在委托中处理通知数据以及如何处理?
谢谢。
【问题讨论】:
-
您可能正在寻找后台刷新。前往 RayWenderlich 的 Background Modes Tutorial: Getting Started,也值得一读:tutplus' iOS 7 SDK: Working with Background Fetch
-
我想这会对你有所帮助:stackoverflow.com/questions/35058870/…
标签: ios swift apple-push-notifications