差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
im:ios:apns:content [2020/08/14 09:01] zhaoliang |
im:ios:apns:content [2022/11/09 07:39] victorli [REST 发送] |
||
---|---|---|---|
行 119: | 行 119: | ||
---- | ---- | ||
- | ===== 向APNs中添加扩展字段 ===== | + | ===== 向 APNs 中添加扩展字段 ===== |
- | APNs扩展(em_apns_ext):添加后,您收到的 APNs 中将带有您填写的字段,可以帮助您区分 APNs。 | + | APNs 扩展(em_apns_ext):添加后,您收到的 APNs 中将带有您填写的字段,可以帮助您区分 APNs。 |
环信提供以下几种扩展字段: | 环信提供以下几种扩展字段: | ||
+ | |||
^扩展字段^描述^ | ^扩展字段^描述^ | ||
|em_push_content|自定义推送显示| | |em_push_content|自定义推送显示| | ||
行 152: | 行 153: | ||
=== REST 发送 === | === REST 发送 === | ||
- | ([[im:server:basics:messages#发送扩展消息|REST 发消息]]) | + | ([[https://docs-im.easemob.com/ccim/rest/message#发送消息|REST 发消息]]) |
<code> | <code> | ||
行 229: | 行 230: | ||
} | } | ||
} | } | ||
+ | </code> | ||
+ | |||
+ | 如果要兼容Android端,需要在消息的扩展中增加以下字段 | ||
+ | <code> | ||
+ | "ext":{ | ||
+ | ... | ||
+ | "em_android_push_ext":{ | ||
+ | //指定自定义渠道 | ||
+ | "em_push_channel_id":"Channel id", | ||
+ | "em_push_sound":"/raw/appsound" | ||
+ | } | ||
+ | } | ||
</code> | </code> | ||
行 351: | 行 364: | ||
存放路径 | 存放路径 | ||
- | AppData/Library/Sounds | + | AppData/Library/Sounds,时长不得超过30秒。 |
具体信息,可以参考苹果官方文档[[https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification?language=objc|Generating a Remote Notification]] | 具体信息,可以参考苹果官方文档[[https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification?language=objc|Generating a Remote Notification]] | ||
行 656: | 行 669: | ||
<WRAP half column> | <WRAP half column> | ||
- | 下一页:[[im:ios:other:easeui|EaseUI 使用指南]] | + | 下一页:[[im:ios:other:easeimapp|EaseIM 介绍]] |
</WRAP> | </WRAP> | ||
</WRAP> | </WRAP> | ||