目前_receiversOffline函数是这样写的
AV.Cloud.define('_receiversOffline', function(request, response) {
var params = request.params;
var content = JSON.parse(params.content);
var json = {
// 自增未读消息的数目,不想自增就设为数字
badge: "Increment",
sound: "default",
// 使用开发证书
_profile: "dev",
// content 为消息的实际内容
alert: '您有新的消息'
};
var pushMessage = JSON.stringify(json);
response.success({"pushMessage": pushMessage, "skip": content._lctype>0});
})
应该说ios推送内容应该是静态的‘您有新的消息’;但是在ios上收到推送提醒显示的还是json数据:
{"lcattrs":{"username":"xx昵称","conversationType":0},"lctype":-1,"_lctext":"[偷笑]","sendTimestamp":1528095662369.032}