差别

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

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
上一修订版 两侧同时换到之后的修订记录
start:300iosclientintegration:85apnscontent [2017/07/10 07:01]
liulj
start:300iosclientintegration:85apnscontent [2018/11/06 11:41]
jk 移除
行 10: 行 10:
 { {
  "​aps":​{  "​aps":​{
- "​alert":"​您有一条新消息",​  ​+ "​alert":{ 
 + "​body":"​您有一条新消息"​ 
 + },  
  "​badge":​1,​  ​  "​badge":​1,​  ​
  "​sound":"​default"​  ​  "​sound":"​default"​  ​
行 16: 行 18:
  "​f":"​6001",​  ​  "​f":"​6001",​  ​
  "​t":"​6006",​  ​  "​t":"​6006",​  ​
- "​m":"​14aec1e00ef"​  ​+ "​m":"​373360335316321408"​  ​
 } }
 </​code>​ </​code>​
行 32: 行 34:
 { {
  "​aps":​{  "​aps":​{
- "​alert":"​ApnsName:​xxxx",​  ​+ "​alert":​
 + "body":"​ApnsNickName:xxxx" 
 + },  
  "​badge":​1,​  ​  "​badge":​1,​  ​
  "​sound":"​default"​  ​  "​sound":"​default"​  ​
行 38: 行 42:
  "​f":"​6001",​  ​  "​f":"​6001",​  ​
  "​t":"​6006",​  ​  "​t":"​6006",​  ​
- "​m":"​14aec1e00ef"​  ​+ "​m":"​373360335316321408"​  ​
 } }
 </​code>​ </​code>​
  
   * alert: 显示信息   * alert: 显示信息
-  * ApnsName: 发送方设置的用户名(即环信管理后台中看到的用户昵称)+  * ApnsNickName: 发送方设置的用户名(即环信管理后台中看到的用户昵称)
   * xxxx: 消息内容(发送方发的什么,就显示什么)   * xxxx: 消息内容(发送方发的什么,就显示什么)
   * badge: 角标,表示离线消息数   * badge: 角标,表示离线消息数
行 58: 行 62:
 { {
  "​aps":​{  "​aps":​{
- "​alert":"​您有一条新消息",​  ​+ "​alert":{ 
 + "​body":"​您有一条新消息"​ 
 + },  
  "​badge":​1,​  ​  "​badge":​1,​  ​
  "​sound":"​default"​  ​  "​sound":"​default"​  ​
行 65: 行 71:
  "​t":"​6006",​   "​t":"​6006",​
  "​g":"​1421300621769",​  ​  "​g":"​1421300621769",​  ​
- "​m":"​14aec1e00ef"​  ​+ "​m":"​373360335316321408"​  ​
 } }
 </​code>​ </​code>​
行 82: 行 88:
 { {
  "​aps":​{  "​aps":​{
- "​alert":"​ApnsName:​xxxx",​  ​+ "​alert":​
 + "body":"​ApnsNickName:xxxx" 
 + },  
  "​badge":​1,​  ​  "​badge":​1,​  ​
  "​sound":"​default"​  ​  "​sound":"​default"​  ​
行 89: 行 97:
  "​t":"​6006",​   "​t":"​6006",​
  "​g":"​1421300621769",​  "​g":"​1421300621769",​
- "​m":"​14aec1e00ef"​  ​+ "​m":"​373360335316321408"​  ​
 } }
 </​code>​ </​code>​
  
   * alert: 显示信息   * alert: 显示信息
-  * ApnsName: 发送方设置的用户名(即环信管理后台中看到的用户昵称)+  * ApnsNickName: 发送方设置的用户名(即环信管理后台中看到的用户昵称)
   * xxxx: 消息内容(发送方发的什么,就显示什么)   * xxxx: 消息内容(发送方发的什么,就显示什么)
   * badge: 角标,表示离线消息数   * badge: 角标,表示离线消息数
行 112: 行 120:
 { {
  "​aps":​{  "​aps":​{
- "​alert":"​您有一条新消息",​  ​+ "​alert":{ 
 + "​body":"​您有一条新消息"​ 
 + },  
  "​badge":​1,​  ​  "​badge":​1,​  ​
  "​sound":"​default"​  ​  "​sound":"​default"​  ​
行 118: 行 128:
  "​f":"​6001",​  ​  "​f":"​6001",​  ​
  "​t":"​6006",​  ​  "​t":"​6006",​  ​
- "​e":"​扩展内容",​ + "​e":"​推送自定义内容",​ 
- "​m":"​14aec1e00ef"​  ​+ "​m":"​373360335316321408"​  ​
 } }
 </​code>​ </​code>​
  
-  * e: 您发送的自定义内容+  * e: 您发送的推送自定义内容
  
 ==== 发送扩展 ==== ==== 发送扩展 ====
行 143: 行 153:
  "​from":"​6001",​  "​from":"​6001",​
  "​ext":​{  "​ext":​{
- "​em_apns_ext":"​扩展内容"​ +        ​"​em_apns_ext":​
- }+      "extern":"​推送自定义内容"​ 
 +        } 
 +    ​}
 } }
 </​code>​ </​code>​
行 155: 行 167:
 EMChatText *txt = [[EMChatText alloc] initWithText:​@"​test"​];​ EMChatText *txt = [[EMChatText alloc] initWithText:​@"​test"​];​
 EMTextMessageBody *body = [[EMTextMessageBody alloc] initWithChatObject:​txt];​ EMTextMessageBody *body = [[EMTextMessageBody alloc] initWithChatObject:​txt];​
-EMMessage *msg = [[EMMessage alloc] initWithReceiver:​@"​6001" bodies:​@[body]];​+EMMessage *msg = [[EMMessage alloc] initWithReceiver:​@"​6006" bodies:​@[body]];​
 // 设置自定义扩展字段 // 设置自定义扩展字段
-msg.ext = @{@"​em_apns_ext":​@"​扩展内容"​};​+msg.ext = @{@"​em_apns_ext":​@{@"extern":​@"​推送自定义内容"​}};
 // 发送消息 // 发送消息
 [[EaseMob sharedInstance].chatManager asyncSendMessage:​msg progress:​nil];​  [[EaseMob sharedInstance].chatManager asyncSendMessage:​msg progress:​nil];​ 
行 196: 行 208:
 EMChatText *txt = [[EMChatText alloc] initWithText:​@"​test"​];​ EMChatText *txt = [[EMChatText alloc] initWithText:​@"​test"​];​
 EMTextMessageBody *body = [[EMTextMessageBody alloc] initWithChatObject:​txt];​ EMTextMessageBody *body = [[EMTextMessageBody alloc] initWithChatObject:​txt];​
-EMMessage *msg = [[EMMessage alloc] initWithReceiver:​@"​6001" bodies:​@[body]];​+EMMessage *msg = [[EMMessage alloc] initWithReceiver:​@"​6006" bodies:​@[body]];​
 // 设置自定义扩展字段 // 设置自定义扩展字段
 msg.ext = @{@"​em_ignore_notification":​@YES};​ msg.ext = @{@"​em_ignore_notification":​@YES};​
行 237: 行 249:
 EMChatText *txt = [[EMChatText alloc] initWithText:​@"​test"​];​ EMChatText *txt = [[EMChatText alloc] initWithText:​@"​test"​];​
 EMTextMessageBody *body = [[EMTextMessageBody alloc] initWithChatObject:​txt];​ EMTextMessageBody *body = [[EMTextMessageBody alloc] initWithChatObject:​txt];​
-EMMessage *msg = [[EMMessage alloc] initWithReceiver:​@"​6001" bodies:​@[body]];​+EMMessage *msg = [[EMMessage alloc] initWithReceiver:​@"​6006" bodies:​@[body]];​
 // 设置自定义扩展字段 // 设置自定义扩展字段
 msg.ext = @{@"​em_force_notification":​@YES};​ msg.ext = @{@"​em_force_notification":​@YES};​
行 254: 行 266:
 { {
  "​aps":​{  "​aps":​{
- "​alert":"​自定义信息",​  ​+ "​alert":{ 
 + "​body":"​自定义推送显示内容" 
 + },  
  "​badge":​1,​  ​  "​badge":​1,​  ​
  "​sound":"​default"​  ​  "​sound":"​default"​  ​
行 260: 行 274:
  "​f":"​6001",​  ​  "​f":"​6001",​  ​
  "​t":"​6006",​  ​  "​t":"​6006",​  ​
- "​m":"​14aec1e00ef"​  ​+ "​m":"​373360335316321408"​  ​
 } }
 </​code>​ </​code>​
行 281: 行 295:
  "​ext":​{  "​ext":​{
  "​em_apns_ext":​{  "​em_apns_ext":​{
- "em_push_title":"​自定义信息"+ "em_push_content":"​自定义推送显示内容"
  }  }
  }  }
行 294: 行 308:
 EMChatText *txt = [[EMChatText alloc] initWithText:​@"​test"​];​ EMChatText *txt = [[EMChatText alloc] initWithText:​@"​test"​];​
 EMTextMessageBody *body = [[EMTextMessageBody alloc] initWithChatObject:​txt];​ EMTextMessageBody *body = [[EMTextMessageBody alloc] initWithChatObject:​txt];​
-EMMessage *msg = [[EMMessage alloc] initWithReceiver:​@"​6001" bodies:​@[body]];​+EMMessage *msg = [[EMMessage alloc] initWithReceiver:​@"​6006" bodies:​@[body]];​
 // 设置自定义扩展字段 // 设置自定义扩展字段
-msg.ext = @{@"​em_apns_ext":​@{@"​em_push_title":​@"​自定义信息"}};+msg.ext = @{@"​em_apns_ext":​@{@"​em_push_content":​@"​自定义推送显示内容"}};
 // 发送消息 // 发送消息
 [[EaseMob sharedInstance].chatManager asyncSendMessage:​msg progress:​nil];​ [[EaseMob sharedInstance].chatManager asyncSendMessage:​msg progress:​nil];​
行 309: 行 323:
 { {
  "​aps":​{  "​aps":​{
- "​alert":"​自定义信息",​  ​+ "​alert":{ 
 + "​body":"​自定义推送显示内容" 
 + },  
  "​badge":​1,​  ​  "​badge":​1,​  ​
  "​sound":"​default"​  ​  "​sound":"​default"​  ​
行 315: 行 331:
  "​f":"​6001",​  ​  "​f":"​6001",​  ​
  "​t":"​6006",​  ​  "​t":"​6006",​  ​
- "​m":"​14aec1e00ef", + "​m":"​373360335316321408", 
- "​e":"​扩展内容"​+ "​e":"​推送自定义内容"​
 } }
 </​code>​ </​code>​
行 337: 行 353:
  "​ext":​{  "​ext":​{
  "​em_apns_ext":​{  "​em_apns_ext":​{
- "em_push_title":"​自定义信息", + "em_push_content":"​自定义推送显示内容", 
-                        "​extern":​ "扩展内容"​+ "​extern":​ "推送自定义内容"​
  }  }
  }  }
行 351: 行 367:
 EMChatText *txt = [[EMChatText alloc] initWithText:​@"​test"​];​ EMChatText *txt = [[EMChatText alloc] initWithText:​@"​test"​];​
 EMTextMessageBody *body = [[EMTextMessageBody alloc] initWithChatObject:​txt];​ EMTextMessageBody *body = [[EMTextMessageBody alloc] initWithChatObject:​txt];​
-EMMessage *msg = [[EMMessage alloc] initWithReceiver:​@"​6001" bodies:​@[body]];​+EMMessage *msg = [[EMMessage alloc] initWithReceiver:​@"​6006" bodies:​@[body]];​
 // 设置自定义扩展字段 // 设置自定义扩展字段
-msg.ext = @{@"​em_apns_ext":​@{@"​em_push_title":​@"​自定义信息",​@"​extern":​@"​扩展内容"​}};​+msg.ext = @{@"​em_apns_ext":​@{@"​em_push_content":​@"​自定义推送显示内容",​@"​extern":​@"​推送自定义内容"​}};​
 // 发送消息 // 发送消息
 [[EaseMob sharedInstance].chatManager asyncSendMessage:​msg progress:​nil];​ [[EaseMob sharedInstance].chatManager asyncSendMessage:​msg progress:​nil];​