···1import UserNotifications
2+import UIKit
34let APP_GROUP = "group.app.bsky"
5···32 }
3334 func mutateWithBadge(_ content: UNMutableNotificationContent) {
35+ var count = prefs?.integer(forKey: "badgeCount") ?? 0
36+ count += 1
37+38+ // Set the new badge number for the notification, then store that value for using later
39+ content.badge = NSNumber(value: count)
40+ prefs?.setValue(count, forKey: "badgeCount")
41 }
4243 func mutateWithChatMessage(_ content: UNMutableNotificationContent) {
···31 forKey: keyof BackgroundNotificationHandlerPreferences,
32 value: string[],
33 ) => Promise<void>
034}
3536// TODO there are more preferences in the native code, however they have not been added here yet.
···31 forKey: keyof BackgroundNotificationHandlerPreferences,
32 value: string[],
33 ) => Promise<void>
34+ setBadgeCountAsync: (count: number) => Promise<void>
35}
3637// TODO there are more preferences in the native code, however they have not been added here yet.