GCM works fine on Android but not working on iOS -


i've succefuly implemented gcm android when tried implement ios version won't push messages.

i got gcm token @ ios version, , sent messages (i used postman). got succesful response , unique message id no push recieved. i've been struggling few days.

i tried create new gcm project , running gcm examples ios nothing works.

i'm using same account ios , android same apikey ofcourse.

postman code:

{           "collapse_key": "score_update",           "time_to_live": 108,           "delay_while_idle": true,           "data": {             "score": "4x8",             "time": "15:16.2342"           },           "registration_ids":["my token"], } 

what missing?

i had same problem, , it's fixed using content_available , priority options shown in below documentation:

you should send "content_available":true, , "priority":"high",

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

enter image description here

sample json request:

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

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -