From 992490812e58831fc46245b6b0cbd29d1ef78164 Mon Sep 17 00:00:00 2001 From: Amir Saleem Date: Wed, 25 Jan 2023 14:28:56 +0300 Subject: [PATCH] Notification IOS Fix --- ios/Runner/AppDelegate.swift | 10 +++++++++- pubspec.yaml | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index c1c9fd9..528e5c0 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -1,6 +1,7 @@ import UIKit import Flutter import Firebase +import flutter_local_notifications @UIApplicationMain @@ -9,7 +10,14 @@ import Firebase _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { - FirebaseApp.configure() + FirebaseApp.configure() + FlutterLocalNotificationsPlugin.setPluginRegistrantCallback { (registry) in + GeneratedPluginRegistrant.register(with: registry) + } + + if #available(iOS 10.0, *) { + UNUserNotificationCenter.current().delegate = self as UNUserNotificationCenterDelegate + } GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } diff --git a/pubspec.yaml b/pubspec.yaml index def761b..367db22 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -93,7 +93,7 @@ dependencies: flutter_webrtc: ^0.9.16 camera: ^0.10.0+4 flutter_local_notifications: any - firebase_analytics: any + #firebase_analytics: any #Chat Voice Message Recoding & Play audio_waveforms: ^0.1.5+1