扫码关注官方订阅号
用极光推送,如果不通过点击推送的通知进入app,而是通过点击app图标进入app, 那么怎么获取它已经推送过的消息?
人生最曼妙的风景,竟是内心的淡定与从容!
已经找到答案,这个在移动端,我们要添加 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkDidReceiveMessage:) name:kJPFNetworkDidReceiveMessageNotification object:nil];
然后实现方法- (void)networkDidReceiveMessage:(NSNotification *)notification;
然后在服务器端需要在极光推送提供的sdk中填写发给app的消息,并不是给apns的
进而就可以在 networkDidReceiveMessage方法中通过notification.userInfo获取到
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
已经找到答案,这个在移动端,我们要添加 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkDidReceiveMessage:) name:kJPFNetworkDidReceiveMessageNotification object:nil];
然后实现方法- (void)networkDidReceiveMessage:(NSNotification *)notification;
然后在服务器端需要在极光推送提供的sdk中填写发给app的消息,并不是给apns的
进而就可以在 networkDidReceiveMessage方法中通过notification.userInfo获取到