objective-c - 用极光推送,如果不通过点击推送的通知进入app,而是通过点击app图标进入app, 那么怎么获取它已经推送过的消息?
黄舟
黄舟 2017-04-26 09:02:16
0
1
572

用极光推送,如果不通过点击推送的通知进入app,而是通过点击app图标进入app, 那么怎么获取它已经推送过的消息?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
淡淡烟草味

The answer has been found. This is on the mobile side. We need to add [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkDidReceiveMessage:) name:kJPFNetworkDidReceiveMessageNotification object:nil];

Then implement the method - (void)networkDidReceiveMessage:(NSNotification *)notification;

Then on the server side, you need to fill in the message sent to the app in the SDK provided by Aurora Push, not to apns

Then you can get it through notification.userInfo in the networkDidReceiveMessage method

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template