When i send the notification using Firebase console, my onMessage works correctly but when I send the notification using Rest API, it does not trigger at all. My problem is only for iOS. This is my payload for API.
{
"message": {
"token": "my-token",
"notification": {
"title": "New Notification",
"body": "Hello, this is a test notification!"
},
"data": {
"name": "name"
},
"apns": {
"headers": {
"apns-priority": "10"
},
"payload": {
"aps": {
"content-available": 1
}
}
}
}
}