用极光推送,如果不通过点击推送的通知进入app,而是通过点击app图标进入app, 那么怎么获取它已经推送过的消息?
人生最曼妙的风景,竟是内心的淡定与从容!
已经找到答案,这个在移动端,我们要添加 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkDidReceiveMessage:) name:kJPFNetworkDidReceiveMessageNotification object:nil];
然后实现方法- (void)networkDidReceiveMessage:(NSNotification *)notification;
然后在服务器端需要在极光推送提供的sdk中填写发给app的消息,并不是给apns的
进而就可以在 networkDidReceiveMessage方法中通过notification.userInfo获取到
已经找到答案,这个在移动端,我们要添加 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkDidReceiveMessage:) name:kJPFNetworkDidReceiveMessageNotification object:nil];
然后实现方法- (void)networkDidReceiveMessage:(NSNotification *)notification;
然后在服务器端需要在极光推送提供的sdk中填写发给app的消息,并不是给apns的
进而就可以在 networkDidReceiveMessage方法中通过notification.userInfo获取到