function pushNotification(PlayFabId) { const applePayload = { "aps": { "alert": { "title": 'Game Request', "subtitle": 'Five Card Draw', "body": 'Do you want to play poker', }, "category": 'GAME_INVITATION' }, "gameID": '01FA1A786' } return server.SendPushNotification({ Recipient: PlayFabId, AdvancedPlatformDelivery: [ { Platform: "ApplePushNotificationService", Json: JSON.stringify(applePayload) } ] }); }
i used this code to push Notification with some Customize Data in CloudScript, but it fail with error message :
"iOS Push Notification Failed: ValidationError 1 validation error detected: Value null at 'message' failed to satisfy constraint: Member must not be null"
,const applePayload = { "aps": { "alert": { "title": 'Game Request', "subtitle": 'Five Card Draw', "body": 'Do you want to play poker', }, "category": 'GAME_INVITATION' }, "gameID": '01FA1A786' } return server.SendPushNotification({ Recipient: 'E01FA1A786D39B97', AdvancedPlatformDelivery: [ { Platform: "ApplePushNotificationService", Json: JSON.stringify(applePayload) } ] });
=====
I used this code in CloudScript to push a notification (IOS Devices), but it got an error :
"iOS Push Notification Failed: ValidationError 1 validation error detected: Value null at 'message' failed to satisfy constraint: Member must not be null"