Question: I am currently working on an app and I have implement firebase Push Notification service into my app. I am recieving notification on my iphone but I am unable to set the custom alert sound that I want.

* I added the sound as a .caf
* I added the sound to the `Copy Bundle Resources`

using `print (userInfo)` I have collected this data that is incomming from Firebase

```
aps: {
alert =     {
    body = MSG;
    title = Title;
};
sound = default;}, {...}, sound: alarm.caf

```

I understand where the problem is, I just dont understand how to fix it so that the app plays my custom notification sound.

![Firebase notification console IMG](https://i.stack.imgur.com/HtxBT.png)

Answer: 
Problem with Firebase is that you can not send **sound parameter** like custom parameter with Firebase Console, if you try this as you do, you will get this parameter in app outside of aps Dictionary and the system will not recognize it as a sound to be played although the sound file is into the project.

The only solution for this problem is you have some **API/server** through which you'll be sent a Firebase notification. When server send you a notification with sound param it will be within aps Dictionary and application will play this sound when the notification arrives.
It's been over 5 years, but if someone still looking for an answer, here is what I did.

1. Make sure you have configured Firebase Messaging & receiving Notifications.
2. Add .caf ( sound file ) to the app. It must be visible on
'Target' - > 'Build Phases' & then under 'Copy Bundle Resources'

[![enter image description here](https://i.stack.imgur.com/lPpt3.png)](https://i.stack.imgur.com/lPpt3.png)

3. Delete the app from the device ( This is important )
4. I use Postman as my server, so message format would be,

```
{ 
 "notification": {
 "title": "Hello",
 "sound":"small_message.caf",
 "body": "You have a new Job"
},

"to": "your device token"
}

```