Please use the notification
object in the Send Notifications API to customize the display and behavior of iOS notifications, such as:
- Notification body
- Badge count
- Sound
- Localization
To use a custom sound, include the sound file as an asset in your Xcode project (.aiff, .wav or .caf file) and specify the sound file name in the Send Notifications API request body as follows:
{
"to": "a6345d0278adc55d3474f5",
"data": {
"message": "Hello World!"
},
"notification": {
"body": "Hello World \u270c",
"badge": 1,
"sound": "ping.aiff"
}
}
For adding an image to your notification, please use a Notification Service Extension to remotely fetch the hosted image (via URL) before displaying a local notification to the user with this image. Here's a guide on how to implement this: