Closed
Description
Bug report
Describe the bug
The initialization code on iOS fails to execute.
Steps to reproduce
print('configuring fcm...');
_firebaseMessaging.configure();
print('requesting ios permissions...');
_firebaseMessaging.requestNotificationPermissions();
print('getting fcm token...');
token = await _firebaseMessaging.getToken();
print('finished getting fcm token');
print("FirebaseMessaging token: $token");
finished getting fcm token
never gets printed in console, not on iOS emulator nor on real device.
Expected behavior
On Android the same code works just fine with no errors.
Additional context
I tried the solution suggested here by restricting access to Firebase Installations API in Google Cloud Console specifically for iOS key, but it seems to not help.
Flutter doctor
Run flutter doctor
and paste the output below:
Click To Expand
Doctor summary (to see all
details, run flutter doctor
-v):
[✓] Flutter (Channel stable,
1.22.0, on Mac OS X
10.15.7 19H2, locale
ru-UA)
[✓] Android toolchain - develop for Android devices (Android SDK
version 30.0.0)
[✓] Xcode - develop for iOS
and macOS (Xcode 11.7)
[✓] Android Studio (version
4.0)
[✓] VS Code (version 1.49.2)
[✓] Connected device (1
available)
Flutter dependencies
Run flutter pub deps -- --style=compact
and paste the output below:
Click To Expand
firebase_messaging: 7.0.2