Time sensitive notifications not being received

Viewed 75

I am working on adding time sensitive notifications to my app written in SWIFT. However, I am running into some bumps in the road. I am able to receive and process notifications just fine however, I am unable to receive "time-sensitive" notifications. I was wondering if anybody has had this issue with swift and had any ideas. here is the versions of swift, and the firebase packages IOS Version : 15.5

and an example message i'm sending to the https://fcm.googleapis.com/fcm/send

import requests
import json

serverToken = <server_token>
deviceToken = <device_token>

headers = {
'Content-Type': 'application/json',
'Authorization': 'key=' + serverToken,
}

body = {
"notification":{
"title":"My web app name",
"body":"message",
"badge" : 1,
"sound" : "chime.aiff",
"interruption-level": "time-sensitive",
"content_available" : "true"
},

"to": deviceToken
}

response = requests.post("https://fcm.googleapis.com/fcm/send",headers = headers, data=json.dumps(body),)
print(response.status_code)

print(response.json())

I can see in my app logs that "interruption-level" is not being taken as a APS token, it is being taken as gcm notification: AnyHashable("gcm.notification.interruption_level"): time-sensitive

0 Answers
Related