[iOS] Removing badge count once notification is clicked
See original GitHub issueI have a question regarding the iOS badge count, as this doesn’t seem very well documented at the moment.
I currently have a setup where a weekly notification is scheduled once the app is initially started. As so:
cordova.plugins.notification.local.schedule({
id: 1,
title: 'My app',
text: 'Message',
foreground: true,
every: 'week',
badge: 1,
})
Question: How do you remove the icon badge number after you’ve entered the app by clicking the notification?
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Clear badge count without removing… - Apple Developer
So I've read that to clear notifications out of the notification center, you simply use setApplicationIconBadgeNumber and set the value to 0.
Read more >How to clear badge counter on click of app icon in iphone?
To clear the badge count whenever the application becomes active use delegate method. You can use UIApplicationDelegate in AppDelegate.
Read more >iOS 15: How to Hide App Notification Badges on the Home ...
1. Open Control Center by swiping down diagonally from the top-right corner of the screen. 2. Tap the Focus button. 3. Tap the...
Read more >Notifications - Expo Documentation
Sets the badge of the app's icon to the specified number. Setting to 0 clears the badge. On iOS, this method requires that...
Read more >Creating React Native badge components in iOS
Enabling remote push notifications in iOS apps is another way to dynamically trigger the badge counter and removes the need for a user...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@katzer You wrote:
Is that correct, even though you did not use the
every
keyword?I feel like the docs for repeating notifications could be a bit more extensive.