@@ -7,7 +7,8 @@ class AppDelegate: NSObject, UIApplicationDelegate, ObservableObject, UNUserNoti
_ application: UIApplication,
didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
- UNUserNotificationCenter.current().delegate = self
+ UNUserNotificationCenter.current().delegate = BaseUserNotificationsManager.shared
+
application.registerForRemoteNotifications()
return true
}
@@ -591,6 +591,8 @@ extension BaseUserNotificationsManager: BolusFailureObserver {
extension BaseUserNotificationsManager: UNUserNotificationCenterDelegate {
+ static let shared = BaseUserNotificationsManager(resolver: FreeAPSApp.resolver)
func userNotificationCenter(
_: UNUserNotificationCenter,
willPresent _: UNNotification,