邮递员发送推送通知firebase

时间:2017-02-15 09:29:11

标签: ios push-notification postman

我使用邮递员发出HTTP请求,向主题发送推送通知,我使用了这个正文信息:

CodePush.notifyAppReady();

当然,我将授权密钥放在标题中,请求成功并获取:

{
  "to" : "/topics/mahdi",
  "priority" : "high",
  "notification" : {
    "body" : "This is a Firebase Cloud Messaging Topic Message!",
    "title" : "FCM Message2"
  }
}

但是我的iOS设备没有收到通知,请问哪里有错误?

1 个答案:

答案 0 :(得分:1)

确保你有

修改:根据https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html,要使其在后台运行,您还必须在消息中设置以下内容:

"content-available":"1"