差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
后一修订版 两侧同时换到之后的修订记录
im:ios:apns:content [2019/04/17 11:30]
jk [APNs推送国际化配置]
im:ios:apns:content [2019/12/18 10:55]
huanxinfudh [iOS 发送]
行 579: 行 579:
  
 <​code>​ <​code>​
-EMChatText ​*txt = [[EMChatText ​alloc] initWithText:​@"​test"​]; +EMTextMessageBody ​*body = [[EMTextMessageBody ​alloc] initWithText:​@"​test"​];​ 
-EMTextMessageBody *body = [[EMTextMessageBody alloc] initWithChatObject:​txt]; +EMMessage *message ​= [[EMMessage alloc] ​initWithConversationID:​@"​6006"​ from:​@"​6001" ​to:@"​6006" ​body:body ext:nil]; 
-EMMessage *msg = [[EMMessage alloc] ​initWithReceiver:​@"​6001" ​bodies:@[body]]; +message.ext = @{@"​em_ignore_notification":​@YES};​ 
-// 设置自定义扩展字段 +message.chatType = EMChatTypeChat;​ // 设置消息类型 
-msg.ext = @{@"​em_ignore_notification":​@YES};​ +// 发送消息示例 
-// 发送消息 +[EMClient.sharedClient.chatManager ​sendMessage:message ​progress:nil completion:nil];
-[[EaseMob sharedInstance].chatManager ​asyncSendMessage:msg progress:​nil];​+
 </​code>​ </​code>​
  
行 625: 行 624:
  
 <​code>​ <​code>​
-EMChatText ​*txt = [[EMChatText ​alloc] initWithText:​@"​test"​]; +EMTextMessageBody ​*body = [[EMTextMessageBody ​alloc] initWithText:​@"​test"​];​ 
-EMTextMessageBody *body = [[EMTextMessageBody alloc] initWithChatObject:​txt]; +EMMessage *message ​= [[EMMessage alloc] ​initWithConversationID:​@"​6006"​ from:​@"​6001" ​to:@"​6006" ​body:body ext:nil]; 
-EMMessage *msg = [[EMMessage alloc] ​initWithReceiver:​@"​6001" ​bodies:@[body]]; +message.ext = @{@"​em_force_notification":​@YES};​ 
-// 设置自定义扩展字段 +message.chatType = EMChatTypeChat;​ // 设置消息类型 
-msg.ext = @{@"​em_force_notification":​@YES};​ +// 发送消息示例 
-// 发送消息 +[EMClient.sharedClient.chatManager ​sendMessage:message ​progress:nil completion:nil];
-[[EaseMob sharedInstance].chatManager ​asyncSendMessage:msg progress:​nil];​+
 </​code>​ </​code>​