plokko / firebase-php

Php integration of Firebase API (FCM Http v1, RealTime database)
16 stars 9 forks source link

iOS Notification Sound? #21

Open kurtc opened 3 days ago

kurtc commented 3 days ago

Is it possible to set 'sound' => 'default' using this repo please?

On iOS, notifications are not making a sound.

thanks.

kurtc commented 3 days ago

Trying this but it's not working. Please help

$message = new Message();

    //- Add a notification -//

    $message->notification
                ->setTitle($title)
                ->setBody($body);

    $message->data->fill([
        'title'=>$title,
        'body'=>$body,
        'navigate'=>'/calendar',  
        'apns' => [ 
            'payload' => [
                'aps' => [
                    'sound' => 'default'
                ] 
            ]  
        ]    
    ]);