From 2e40c432a336a0abcdcd850d8b9dd34488e395f8 Mon Sep 17 00:00:00 2001 From: Krille Date: Wed, 19 Feb 2025 19:23:41 +0100 Subject: [PATCH] Revert "chore: Follow up request iOS permissions" This reverts commit 2625e89a33421ba189dd96cd84bb7a2311a5e1b9. --- lib/utils/background_push.dart | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/utils/background_push.dart b/lib/utils/background_push.dart index 907cf0701..d854de976 100644 --- a/lib/utils/background_push.dart +++ b/lib/utils/background_push.dart @@ -72,9 +72,6 @@ class BackgroundPush { void _init() async { try { - if (PlatformInfos.isIOS) { - await firebase?.requestPermission(); - } await _flutterLocalNotificationsPlugin.initialize( const InitializationSettings( android: AndroidInitializationSettings('notifications_icon'), @@ -150,6 +147,9 @@ class BackgroundPush { Set? oldTokens, bool useDeviceSpecificAppId = false, }) async { + if (PlatformInfos.isIOS) { + await firebase?.requestPermission(); + } if (PlatformInfos.isAndroid) { _flutterLocalNotificationsPlugin .resolvePlatformSpecificImplementation< @@ -306,9 +306,6 @@ class BackgroundPush { Logs().v('Setup firebase'); if (_fcmToken?.isEmpty ?? true) { try { - if (PlatformInfos.isIOS) { - await firebase?.requestPermission(); - } _fcmToken = await firebase?.getToken(); if (_fcmToken == null) throw ('PushToken is null'); } catch (e, s) {