发送透传消息,对方收到了远程推送--iOS
当我在一段发送了透传消息,结构对方在没上线的时候收到了远程推送。有人见过吗?? 客服说我发送的没问题 但是事实是收到了 有人遇见过吗??
NSDictionary * dict = obj.object;
NSString * chatter = dict[@"chatter"];
EMChatCommand *cmdChat = [[EMChatCommand alloc] init];
cmdChat.cmd = @"online_guide_proid";
EMCommandMessageBody *body = [[EMCommandMessageBody alloc] initWithChatObject:cmdChat];
// 生成message
EMMessage *message = [[EMMessage alloc] initWithReceiver:chatter bodies:@[body]];
if(dict[@"ext"]){
message.ext = dict[@"ext"];
}
message.messageType = eMessageTypeChat; // 设置为单聊消息
message.requireEncryption = YES;
[[EaseMob sharedInstance].chatManager asyncSendMessage:message progress:nil];
NSDictionary * dict = obj.object;
NSString * chatter = dict[@"chatter"];
EMChatCommand *cmdChat = [[EMChatCommand alloc] init];
cmdChat.cmd = @"online_guide_proid";
EMCommandMessageBody *body = [[EMCommandMessageBody alloc] initWithChatObject:cmdChat];
// 生成message
EMMessage *message = [[EMMessage alloc] initWithReceiver:chatter bodies:@[body]];
if(dict[@"ext"]){
message.ext = dict[@"ext"];
}
message.messageType = eMessageTypeChat; // 设置为单聊消息
message.requireEncryption = YES;
[[EaseMob sharedInstance].chatManager asyncSendMessage:message progress:nil];
没有找到相关结果
已邀请:
1 个回复
[已注销]
如果接收到透传消息的apns推送,请检查一下是否接受的是透传消息,- (void)didReceiveOfflineCmdMessages:(NSArray *)offlineCmdMessages;这是接收离线透传消息的回调,您可以监听是否走这个方法。