差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 后一修订版 两侧同时换到之后的修订记录 | ||
im:ios:apns:content [2019/04/17 11:28] jk [APNs推送国际化配置] |
im:ios:apns:content [2019/12/18 10:55] huanxinfudh [iOS 发送] |
||
---|---|---|---|
行 465: | 行 465: | ||
**注:** | **注:** | ||
- | * title-loc-key 与 title-loc-args 组成一对,没有 title-loc-key , title-loc-args 不生效,如无可变参数,可以只设置 title-loc-key; | + | * ''title-loc-key'' 与 ''title-loc-args'' 组成一对,没有 ''title-loc-key'' , ''title-loc-args'' 不生效,如无可变参数,可以只设置 ''title-loc-key''; |
| | ||
- | * loc-key 与 loc-args 组成一对,没有 loc-key , loc-args 不生效,如无可变参数,可以只设置 loc-key; | + | * ''loc-key'' 与 ''loc-args'' 组成一对,没有 ''loc-key'' , ''loc-args'' 不生效,如无可变参数,可以只设置 ''loc-key''; |
| | ||
* 以上两对也可以只设置其中一对。 | * 以上两对也可以只设置其中一对。 | ||
行 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> | ||