iOS Question Custom Sound in Firebase Notification

Marcos Alves

Well-Known Member
Licensed User
Hello all,

in Firebase Notification using IOS there is a specific key that contains the sound to be played, like this:
PHP:
            $iosAlert = array(
                'title' => "Atention",
                'body' => "You have a new order!",
                'sound' => "default"
            );

Instead of Android, the notification is generated by IOS and once registered by app occurs independent of any code inside it. Is there any way to change the sound in the key 'sound' => "default" to play a custom or other system default sound (like ring for example)? .
By the way, I tried to put a wav or aif sound in the resources directory of the app (loading it with de designer builder as in Android) but didn't work. I tried also to put the sound file in /special directory also...

Does anybody know if it's possible to change the FCN default sound in IOS?

Thanks!
 

MarcoRome

Expert
Licensed User
B4X:
.....
$sound = 'sound.wav';           
$iosAlert = array(
                  'notification' =>
                  array (
                    'title' => $title,
                    'body' => $body,
                    'sound' => $sound,
                  ),
....

Add sound.wav into Files/Special
 
Upvote 0
Top