ios端plus.push.createMessage创建本地推送,没有收到推送直接闪退
plus.push.addEventListener('receive', function(message) {
var msgObj = (plus.os.name=='iOS')?message.payload:JSON.parse(message.payload);
plus.push.createMessage(msgObj.content,msgObj);//创建本地推送
});
ios端plus.push.createMessage创建本地推送,没有收到推送直接闪退
plus.push.addEventListener('receive', function(message) {
var msgObj = (plus.os.name=='iOS')?message.payload:JSON.parse(message.payload);
plus.push.createMessage(msgObj.content,msgObj);//创建本地推送
});
2 个回复
4***@qq.com
请问解决了吗,如果解决了烦请告知下,谢谢
AimerQAQ - QAQ
JSON解析不符合格式,就会闪退,具体怎样配置JSON,看这个https://ask.dcloud.net.cn/article/36622