wix / react-native-notifications

React Native Notifications
MIT License
3.25k stars 764 forks source link

Notification count/badge doesn't show on the app icon IOS. #994

Open tdammy92 opened 1 year ago

tdammy92 commented 1 year ago

Notification count doesn't show on Ios App icon but shows on the android app icon. have gone through the documentation, I cant find anything on that.

can anyone help here 🙏🏽

sharadedkey commented 1 year ago

I am also looking for same issue.

tdammy92 commented 10 months ago

I am also looking for same issue.

@sharadedkey have you found any useful fix for this ???

sharadedkey commented 10 months ago

@tdammy92 No. I am just displaying count 1 if have notifications.

tdammy92 commented 9 months ago

@sharadedkey do you mind sharing that part of ur code ??. i actually tried something like that. but noticed users on ios started getting multiple notifications.

sharadedkey commented 9 months ago

@tdammy92 Sure. var pushIdentifierFG = '' Notifications.events().registerNotificationReceivedForeground((notification, completion) => { console.log('Notification received in foreground: ', notification);

        if(pushIdentifierFG != notification.identifier){
            pushIdentifierFG = notification.identifier
            console.log('iOS TEST : SINGLE NOTIFICAIONS ')
            completion({ alert: true, sound: true, badge: true });
          } else {
            pushIdentifierFG = ''
            console.log('iOS TEST : DOUBLE NOTIFICAIONS registerNotificationReceivedForeground')
          }

});