I am trying to set the default sound for a push notification sent and have the following message object to pass through.
var message = {
notification: {
title: "X",
body: "X",
sound: 'default'
}
token: fcmToken
};
I continue, however, to receive the following error in my cloud function log:
Error sending message: Error: Invalid JSON payload received. Unknown name "sound" at 'message.notification': Cannot find field.
I've tried placing the sound property under the notification object, apns-payload-aps object, and cannot seem to locate documentation on the correct syntax to activate the default sound on iOS.
Any help is appreciated.