[英]I need to parse the payload from push notification, but if user press game icon instead of press notification, how can I get the data?
I need to parse the payload from different push notification, but if user press game icon instead of pressing notification to start the app, how can I get the payload? 我需要从不同的推送通知中解析有效负载,但如果用户按下游戏图标而不是按通知启动应用程序,我该如何获得有效负载?
I already implement these two: 我已经实现了这两个:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
If user press game icon to start game, the launchOptions is nil, So how to do? 如果用户按游戏图标开始游戏,则launchOptions为零,那该怎么办? Is there any method provide to read push notification from notification center ?
是否有任何方法可以从通知中心读取推送通知?
Very appreciate for your help. 非常感谢您的帮助。
如果用户忽略了推送通知并从图标中打开了应用程序,那么您将没有任何意义来获取该通知有效负载,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.