flutter_app_badger icon indicating copy to clipboard operation
flutter_app_badger copied to clipboard

I'm not able to display the counter on ios

Open ederluca opened this issue 3 years ago • 10 comments

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?

ederluca avatar Jan 13 '22 15:01 ederluca

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

rohitrvayuz avatar Jan 20 '22 17:01 rohitrvayuz

@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 avatar Jan 25 '22 17:01 ederluca

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

ederluca avatar Jan 25 '22 17:01 ederluca

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

JaviCore avatar Feb 04 '22 03:02 JaviCore

Any solutions found for this @ederluca @JaviCore ?

MuraliThangavel avatar Feb 04 '22 04:02 MuraliThangavel

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

JaviCore avatar Feb 04 '22 04:02 JaviCore

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

adrianomicci avatar May 16 '22 17:05 adrianomicci

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

raymondk25 avatar May 18 '23 09:05 raymondk25

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

Did you manage to solve it?

maharramg avatar Jun 09 '23 17:06 maharramg

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

rajputrvm avatar Jun 12 '23 06:06 rajputrvm