【发布时间】:2016-08-27 09:08:38
【问题描述】:
我有一个问题。对于 iOS,我们可以在有效负载中同时发送“数据”和“通知”吗?当只向 GCM 发送“通知”时,我收到了通知。当我同时添加两者时,我没有收到任何通知。我的问题是,如果我想在 iOS 和 android 设备上获得更新,那么有效负载应该是什么?
当前有效载荷:
{
"to":"/topics/testTopic",
"content_available":true,
"priority":"high",
"notification": {
"body":"Test Message",
"title":"test"
},
"data": {
"title": "Title.D Mixed JSON",
"body": "Content.D Mixed JSON",
"productId" : "1"
}
}
【问题讨论】:
标签: ios objective-c google-cloud-messaging apple-push-notifications