简体   繁体   English

我需要从推送通知中解析有效负载,但如果用户按下游戏图标而不是按通知,我该如何获取数据?

[英]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.

相关问题 iOS推送通知-单击应用程序图标而不是通知时如何获取通知数据 - iOS Push Notification - How to get the notification data when you click on the app icon instead of notification 如何获得自定义声音以与Apple Push Notification一起播放? - How can I get a custom sound to play with an Apple Push Notification? 如何从应用程序外部收到的用户未激活/触摸的推送通知中接收信息? - How can I receive info from a push notification received outside of app that the user did not activate/touch? 我可以为此使用推送通知吗 - Can I use Push Notification for this 如何以程序员身份删除应用程序图标的推送通知数? - How i can delete the number of push notification by the app-icon as programmer? didReceiveLocalNotification:该方法仅在我按通知横幅时有效 - didReceiveLocalNotification: method works only if I press on notification banner 如果用户从我的iOS应用中“标记”某些资料,我可以从parse.com收到某种通知吗? - Can I get some sort of notification from parse.com if a user “flags” certain material from my iOS app? 从主屏幕启动应用程序无法获得远程推送有效负载? 但是从通知中心启动工作 - Launch app from homescreen can't get remote push payload? But launch from Notification Center works 我需要一点 Apple Push Notification 说明 - I need a little Apple Push Notification clarification 收到推送通知后,如何拨打电话? - How can I make a call, as I recieve a push notification?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM