New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰 [firebase_messaging] Why ios badge data is managed in alert ? #9533
Comments
@bebe0612 |
@darshankawar When I send fcm message with badge, We should be able to get badge count in but this package get badge data in aps.alert.badge not aps.badge so this is problem what i claim. is it my fault ? |
Check this comment and see if it helps. |
@darshankawar |
Thanks for the feedback. I see that the
flutterfire/packages/firebase_messaging/firebase_messaging/ios/Classes/FLTFirebaseMessagingPlugin.m Line 939 in 49921a4
Looking at https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/aps#badge I am not exactly sure if this is expected behavior, so keeping this issue open for further insights from the team. /cc @russellwheatley |
@darshankawar @russellwheatley Is there any update on this? Seeing the same issue. |
In flutter, I think, managing badge data in fcm is not a good way because it only handles each native side. Instead, It is a good way to handle on the flutter side by using flutter_app_badger package. If you do this, you can handle not only fcm badge data but custom badge data also. In my case, I have to handle badge count in background, but thanks to Maybe many developer are knowing this trick that no one raise this issue. |
@bebe0612 Thanks for your reply! Yeah, I am using that package now to update the badge count, but it's still unfortunate that |
Thanks for the report. Confirmed and PR is here. |
My firebase background handler does not get triggered on IOS when app is terminated or in background, so, I can't update the badge count. Any solutions? |
Bug report
Describe the bug
When my spring server send FCM push message by using firebase admin client to my flutter app,
firebase_messaging
package handles ios payload uncorrectly. below is fcm ios payloadI found that this package extract badge data from
apsAlertDict
not fromapsDict
. is it right?obviously in flutter project, badge data in remoteMessage is null because apsAlertDict have not badge.
I don't understand and i can't find any who ask this problem.
The text was updated successfully, but these errors were encountered: