From 87b079a8ef4cf5daea675bcea16f24d1deee2b52 Mon Sep 17 00:00:00 2001 From: Codel1417 Date: Tue, 7 May 2024 21:39:53 -0400 Subject: [PATCH] add IOS notification delegate --- ios/Runner/AppDelegate.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 70693e4a..9413c697 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -8,6 +8,9 @@ import Flutter didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { GeneratedPluginRegistrant.register(with: self) + if #available(iOS 10.0, *) { + UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate + } return super.application(application, didFinishLaunchingWithOptions: launchOptions) } }