TF-3275 Fix FCM iOS foreground desync (#3314)

This commit is contained in:
Dat Dang
2024-12-06 13:05:07 +07:00
committed by Dat H. Pham
parent 338262b4b5
commit 2fcb5f03d0
6 changed files with 74 additions and 1 deletions
+24
View File
@@ -0,0 +1,24 @@
# 55. iOS FCM routing
Date: 2024-12-05
## Status
Accepted
## Context
- Notification from FCM contains `mutable-content: true`
- Those notification will be transfered to Notification Service Extension ([See here](https://developer.apple.com/documentation/usernotifications/modifying-content-in-newly-delivered-notifications#Configure-the-payload-for-the-remote-notification)) whether the app is in background or foreground
- Due to the app is in foreground, no notification will be shown
- Due to NSE handle the data, FCM on Flutter side cannot handle it
## Decision
- We check if the app is in foreground or not
- If the app is in foreground, we will not modify the payload and route the payload to FCM foreground method channel
- If the app is in background or terminated, we will keep the current implementation
## Consequences
- Twake Mail iOS app will get latest updates when app is in foreground