简体   繁体   English

从推送通知(FCM)获取数据,而无需点击通知

[英]Get data from push notification (FCM) without do click in notification

I already can manage push notifications from FCM when the app is in Foreground or background, when I do click in notification popup and open app "application didReceiveRemoteNotification" work without problem 当应用程序处于前台或后台时,当我单击通知弹出窗口并打开应用程序“ application didReceiveRemoteNotification”工作时,我已经可以管理来自FCM的推送通知

My problem is that i don't know how get notification push data if the user open the app normaly (do click in icon app instead of click in notification) and I would lost the data if he close the notification 我的问题是,如果用户正常打开应用程序(不要单击通知图标,请单击图标应用程序),我不知道如何获取通知推送数据,如果他关闭通知,我将丢失数据

如果应用程序处于后台状态UINotification,称为应用程序 didReceiveRemoteNotification,如果应用程序处于打开状态UINotification,称为application:didFinishLaunchingWithOptions ,并且在iOS中不单击通知就无法获取数据。

check 校验

UIApplicationLaunchOptionsRemoteNotificationKey or application:didFinishLaunchingWithOptions UIApplicationLaunchOptionsRemoteNotificationKey或应用程序:didFinishLaunchingWithOptions

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM