g123k / flutter_app_badger

Support to update the app badge on the launcher (both for Android and iOS)
https://pub.dev/packages/flutter_app_badger
Apache License 2.0
307 stars 172 forks source link

I'm not able to display the counter on ios #57

Open ederluca opened 2 years ago

ederluca commented 2 years ago

Good Morning

Guys, I'm finding it difficult to make flutter_app_badger work on ios, on android it's working perfectly for devices that have support but not on ios.

The goal is that when receiving a notification sent from firebase in the background or with the app closed, the counter is incremented as the notifications arrive.

I checked the documentation and from what I understand it is enough that the info.plist file has the parameter below:

UIBackgroundModes remote-notification

I have already performed the configuration above and even so I receive the notifications but the icon change does not occur.

I'm using flutter 2.5.3 and using an iphone whose ios version is 15.0.2

Doing a debug I couldn't detect any kind of error it just doesn't happen what I expect, I did another test a little different and if the application is in the foreground I put it to FlutterAppBadger.updateBadgeCount(3) for example the update happens but when the app is. in the background this doesn't happen is there any more configuration needed on the ios part?

rohitrvayuz commented 2 years ago

@ederluca @g123k @atrope @fzyzcjy @f-person Same issue on iOS.

ederluca commented 2 years ago

@ederluca @g123k @atrope @fzyzcjy @f-person Mesmo problema no iOS.

so far I couldn't understand this case on android when it has support it's working without major problems but on IOS it doesn't.

ederluca commented 2 years ago

Good afternoon

Perhaps someone managed to get around this situation on IOS once again when the android device has support it is working however on IOS the indicated icon of the application does not appear when receiving a notification in the background

JaviCore commented 2 years ago

Same problem here on iOS. FCM is working fine but the badge is no updating at all.

MuraliThangavel commented 2 years ago

Any solutions found for this @ederluca @JaviCore ?

JaviCore commented 2 years ago

I'm still debugging stuff right now but it seems to be due to onBackgroundMessage simply not triggering for me no matter what so there's no way for the badge to update

adrianomicci commented 2 years ago

I found out a solution, notification should have content_available set to true. https://github.com/firebase/flutterfire/issues/6112

raymondk25 commented 1 year ago

Same problem here on iOS. FirebaseMessaging.onBackgroundMessage doesn't work on me, so it won't update badge

maharramg commented 1 year ago

Same problem here on iOS. FirebaseMessaging.onBackgroundMessage doesn't work on me, so it won't update badge

Did you manage to solve it?

rajputrvm commented 1 year ago

Same problem here on iOS. FirebaseMessaging.onBackgroundMessage doesn't work on me, so it won't update badge

Did you manage to solve it?

Check this - https://github.com/g123k/flutter_app_badger/issues/57#issuecomment-1127915801