79679528

Date: 2025-06-25 18:54:05
Score: 1.5
Natty:
Report link

As of iOS 17, the current way to set the badge number is by calling:

import UserNotifications
let newBadgeCount = 5
UNUserNotificationCenter.current().setBadgeCount(newBadgeCount)
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: neon443