I'm developing a Flutter application for both Android and IOS. I'm sending to my users custom sound notifications using Firebase Cloud Messaging (FCM).
On Android everything is just fine, I'm receiving the notifications with custom sounds. However, on IOS I'm receiving notifications with default sound.
I'm sending the notifications using the sendMulticast method.
I have configured my Xcode as the following:
I'm using firebase_messaging: ^10.0.3. Here is my code:
Class PushNotificationsManager {
PushNotificationsManager._();
factory PushNotificationsManager() => _instance;
static final PushNotificationsManager _instance =
PushNotificationsManager._();
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging.instance;
bool _initialized = false;
Future<void> init() async {
if (!_initialized) {
// For iOS request permission first.
_firebaseMessaging.requestPermission();
// _firebaseMessaging.configure();
// For testing purposes print the Firebase Messaging token
String token = await _firebaseMessaging.getToken();
globals.newToken = token;
...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.3, on Linux, locale en_IL) [!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.59.1)
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
What is wrong? Why are custom notifications not working on IOS?
I'm developing a Flutter application for both Android and IOS. I'm sending to my users custom sound notifications using Firebase Cloud Messaging (FCM).
On Android everything is just fine, I'm receiving the notifications with custom sounds. However, on IOS I'm receiving notifications with default sound.
My Node.js notification payload:
const payload = { notification: { title: 'title message', body:
body message
, }, android: { priority: "high", notification: { channel_id: 'ATTENTION', tag: groupId, }, }, apns: { payload: { aps: { sound: "sound_03.caf" } }, headers: { "apns-priority": "10" } }, priority: 10 }I'm sending the notifications using the
sendMulticast
method.I have configured my
Xcode
as the following:I'm using
firebase_messaging: ^10.0.3
. Here is my code:Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.2.3, on Linux, locale en_IL) [!] Android toolchain - develop for Android devices (Android SDK version 30.0.2) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses [✓] Android Studio (version 4.0) [✓] VS Code (version 1.59.1) [!] Connected device ! No devices available
! Doctor found issues in 2 categories.
What is wrong? Why are custom notifications not working on IOS?