From 77651e2e951ccb90fa48d10fb2dd4834147070c2 Mon Sep 17 00:00:00 2001 From: efrilm Date: Fri, 29 May 2026 21:56:29 +0700 Subject: [PATCH] update --- ios/Runner/AppDelegate.swift | 14 +++++++++++--- ios/Runner/Runner.entitlements | 8 ++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 ios/Runner/Runner.entitlements diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index a725045..1824ec7 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -1,6 +1,7 @@ import Flutter import UIKit import UserNotifications +import Firebase @main @objc class AppDelegate: FlutterAppDelegate { @@ -8,11 +9,18 @@ import UserNotifications _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { + + FirebaseApp.configure() + // Set notification delegate so notifications show in foreground & background UNUserNotificationCenter.current().delegate = self GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) + + return super.application( + application, + didFinishLaunchingWithOptions: launchOptions + ) } // Called when a notification is delivered while app is in foreground @@ -24,7 +32,7 @@ import UserNotifications completionHandler([.banner, .badge, .sound]) } - // Called when user taps a notification (foreground or background) + // Called when user taps a notification override func userNotificationCenter( _ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, @@ -32,4 +40,4 @@ import UserNotifications ) { completionHandler() } -} +} \ No newline at end of file diff --git a/ios/Runner/Runner.entitlements b/ios/Runner/Runner.entitlements new file mode 100644 index 0000000..903def2 --- /dev/null +++ b/ios/Runner/Runner.entitlements @@ -0,0 +1,8 @@ + + + + + aps-environment + development + +