question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[iOS] Removing badge count once notification is clicked

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
katzercommented, Nov 8, 2017
trigger: { every: { hour: 9, minute: 0, weekday: 7 } }
0reactions
kallebornemarkcommented, Nov 3, 2017

@katzer You wrote:

From the 04.11, do every week, e.g. every Sunday: trigger: { hour: 9, minute: 0, weekday: 7 }

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found