-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Description
https://firebase.google.com/docs/cloud-messaging/customize-messages/live-activity#rest
Using Firebase FCM via HTTP POST to my cloud function endpoint, the live activity update is always delivered with the highest, most intrusive priority (and visually alerts the user, pops the activity down briefly from the dynamic island etc)
If I set this to "5" - it still seems to be delivered at the highest priority - why?
const message = {
token: activity.fcmToken,
apns: {
"live_activity_token": cleanPushToken,
headers: {
"apns-priority": scoreData.priority,
"apns-push-type": "liveactivity"
},
payload: {
aps: {
timestamp: Date.now(),
event: "update",
"content-state": {
homeGoals: scoreData.homeGoals,
visitorGoals: scoreData.visitorGoals,
gameStatus: scoreData.gameStatus
},
alert: {
title: `${scoreData.homeTricode} vs ${scoreData.visitorTricode}`,
body: `${scoreData.homeTricode} ${scoreData.homeGoals} - ${scoreData.visitorGoals} ${scoreData.visitorTricode}`
}
}
}
}
};
Also according to the docs
https://developer.apple.com/documentation/usernotifications/sending-notification-requests-to-apns
We can set this value also to "1" - but when I do this I get an invalid priority error. Can this priority be supported?
How can I deliver Live Activity updates with a lower priority via FCM?
Thank you,
Reproducing the issue
No response
Firebase SDK Version
11.6.0
Xcode Version
26.0.1
Installation Method
Swift Package Manager
Firebase Product(s)
Messaging
Targeted Platforms
iOS
Relevant Log Output
If using Swift Package Manager, the project's Package.resolved
Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.
If using CocoaPods, the project's Podfile.lock
Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!