美文网首页
环信推送离线消息问题

环信推送离线消息问题

作者: 马路边的油酥饼 | 来源:发表于2017-01-07 14:07 被阅读0次

环信推送离线消息 需要显示消息内容,需要更新一下环信的的推送设置,在appdelegate里面接受apns推送消息的回调方法  - (void)application:(UIApplication *)application 

didReceiveRemoteNotification:(NSDictionary *)userInfo

fetchCompletionHandler:

(void (^)(UIBackgroundFetchResult))completionHandler

里面     代码如下:

EMPushOptions *options = [[EMClient sharedClient] pushOptions];

options.displayStyle = EMPushDisplayStyleMessageSummary;

options.displayName = [userInfo objectForKey:@"f"];

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{

EMError *error = nil;

error = [[EMClient sharedClient] updatePushOptionsToServer];

});

相关文章

网友评论

      本文标题:环信推送离线消息问题

      本文链接:https://www.haomeiwen.com/subject/bpdfbttx.html