firebase-ios-sdk
firebase-ios-sdk copied to clipboard
Add a "sentTime" property as it is done on Android SDK
Feature proposal
- Firebase Component: Messaging
Hello !
I am a Flutter developer so i am sorry in advance for the naming conventions / objects that i will describe below, that are probably different from the ones in the native SDKs.
Problem :
I have spoken to a FlutterFire
developer in this issue about a sentTime
property of the RemoteMessage
object when receiving a notification on an iOS device.
In Android, when receiving a notification, we receive a timestamp
that is the time when the notification was sent.
In the iOS SDK, it seems that such property does not exist.
I have contacted Firebase support but they told me that i should see directly with the iOS SDK team as well.
So far as a workaround, we can pass a timestamp
in the payload to do so, but it would much better if it could work like on Android SDK.
The sentTime
property of the notification is passed in the Android SDK and the FlutterFire developers are able to pass it in the firebase_messaging
plugin for Flutter.
Request :
Please add an equivalent property as this sentTime
(the actual name of this property on Android is probably different but you see the meaning and i know it exists) on the iOS SDK.
If this property already exists on the iOS SDK, please accept my apologies and i would be glad to know which one it is.
Thanks in advance !
Thanks for your feedback. We will bring the request to the FM team.
In the meantime, there's a workaround since all the info is passed within the payload. You can access the "sentTime" through the "google.c.a.ts" key in the Message payload.
Thanks for the quick reply.
The developer said this regarding this issue.
It seems that this property is also unavailable in newer iOS versions.
Can you confirm that this property is still available ?
I just tested and it should be available. Are you using console or sender API to send notifications?
I am using the sender API and i guess the firebase team for flutter as well :)
@Tom3652 I'm able to reproduce that HTTP v1 Sender API does not provide "google.c.a.ts" send time. I will check with our team and get back to you.
Hey @chliangGoogle, whilst at properties passed along via Firebase Messaging, there is also another property that is not being received which is the "topic" (or perhaps you can point us in the right direction t find the topic 😄).
So, if a device receives a message via a topic subscription, the topic name isn't found on the userInfo
here.
In contrast, we are receiving the topic name on android here.
Hello, is there any news regarding this issue ?
Thanks !
I don't believe this issue is still exists in new version of iOS. many values are null. iOS version 14.8.1 and firebase_messaging version is 12.0.1. I am using FCM rest api for sending notification
.
We are already in the year 2023 and until today we do not have a simple solution for an issue created in 2021 :man_facepalming:
We are already in the year 2023 and until today we do not have a simple solution for an issue created in 2021 🤦♂️
agree. i still cant find solution for ios.
@Tom3652 I'm able to reproduce that HTTP v1 Sender API does not provide "google.c.a.ts" send time. I will check with our team and get back to you.
Can someone get back to me on this ? i mean i may be wrong but this seems to be an easy thing to fix
Also, as per as the quoted comment it seems to be a bug rather than a feature request
So this issue is still persisting, I am still seeing the sentTime being null
on iOS.