GCM works fine on Android but not working on iOS

后端 未结 2 1551
眼角桃花
眼角桃花 2020-12-21 06:13

I\'ve succefuly implemented the GCM for android but when I tried to implement it to my iOS version I won\'t get the push messages.

I got my gcm token at the iOS vers

2条回答
  •  天命终不由人
    2020-12-21 06:51

    I had the same problem, and it's fixed by using content_available and priority options as shown in below documentation:

    You should send "content_available":true, and "priority":"high",

    https://developers.google.com/cloud-messaging/http-server-ref

    Sample JSON request:

    {
      "content_available":true,
      "to":"fd4...23f7",
      "priority":"high",
      "notification":
        {
        "body":"anything",
        "title":"any title"
        }
    }
    

提交回复
热议问题