Skip to content

Commit 2e40c43

Browse files
committed
Revert "chore: Follow up request iOS permissions"
This reverts commit 2625e89.
1 parent 2625e89 commit 2e40c43

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/utils/background_push.dart

+3-6
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ class BackgroundPush {
7272

7373
void _init() async {
7474
try {
75-
if (PlatformInfos.isIOS) {
76-
await firebase?.requestPermission();
77-
}
7875
await _flutterLocalNotificationsPlugin.initialize(
7976
const InitializationSettings(
8077
android: AndroidInitializationSettings('notifications_icon'),
@@ -150,6 +147,9 @@ class BackgroundPush {
150147
Set<String?>? oldTokens,
151148
bool useDeviceSpecificAppId = false,
152149
}) async {
150+
if (PlatformInfos.isIOS) {
151+
await firebase?.requestPermission();
152+
}
153153
if (PlatformInfos.isAndroid) {
154154
_flutterLocalNotificationsPlugin
155155
.resolvePlatformSpecificImplementation<
@@ -306,9 +306,6 @@ class BackgroundPush {
306306
Logs().v('Setup firebase');
307307
if (_fcmToken?.isEmpty ?? true) {
308308
try {
309-
if (PlatformInfos.isIOS) {
310-
await firebase?.requestPermission();
311-
}
312309
_fcmToken = await firebase?.getToken();
313310
if (_fcmToken == null) throw ('PushToken is null');
314311
} catch (e, s) {

0 commit comments

Comments
 (0)