Sound Not Working on iOS Notifications Sent via AWS SNS Using FCM

34 Views Asked by At

I'm currently using AWS SNS to send push notifications to both Android and iOS apps. However, I've encountered an issue where notifications on iOS devices are received without any sound, while Android devices work as expected. Notably, I'm not using APNs for iOS notifications; I'm utilizing FCM for both platforms.

Here's the payload I'm using for sending push notifications to both Android and iOS devices:

$payload = [
    'GCM' => json_encode([
        'notification' => [
            'body' => $messageText,
            'title' => $messageTitle,
            'sound' => "default",
        ],
        'priority' => 'high',
        'type' => $type,
        'id' => $id,
        'mixture' => $mixed,
    ]),
];

Given that I'm using the same payload for both platforms, I'm unsure why iOS devices are not playing the notification sound. I'm aware that iOS handling might require different considerations, but since I'm using FCM for both, I assumed the configuration would be more straightforward.

Questions:

  1. Is there a specific requirement or configuration for notification sounds on iOS devices through FCM that I might be missing?
  2. Should the payload be structured differently for iOS devices to enable sound, despite using FCM for both platforms?
  3. Are there any known issues with AWS SNS or FCM that could lead to this behavior on iOS devices?

Any insights or solutions to enable sound for iOS notifications sent via FCM through AWS SNS would be greatly appreciated.

0

There are 0 best solutions below