Soo....the payload for notification on the push notification doesn't work, therefore I've been trying to setup push notification with via cloudscript, it works fine with android using Package -> CustomData, but doesn't seem to work at all for iOS.
The push notification delivers fine, just not the payload.
I also tried using AdvancedPlatformDelivery, which gave an error:
handlers.GlobalSendNotification = function (args) { return GlobalSendNotification_internal(args.title,args.message,args.payload); } function GlobalSendNotification_internal(title, message, payload) { server.SendPushNotification({ Recipient: currentPlayerId, Package: { Message: message, Title: title, Badge: 0, CustomData: payload }, AdvancedPlatformDelivery: [ { Json: payload, Platform: "ApplePushNotificationService" } ]}); }
and it gave an error:
{ "FunctionResult": null, "Logs": [ { "Level": "Error", "Message": "PlayFab API request error", "Data": [ [ [] ], [ [ [ [] ], [ [ [ [] ], [ [] ], [ [] ], [ [] ] ] ], [ [ [ [ [] ], [ [] ] ] ] ] ] ], [ [] ], [ [ [ [] ], [ [] ], [ [] ], [ [] ], [ [] ], [ [] ], [ [ [ [ [] ] ] ] ] ] ] ] } ], "ExecutionTimeSeconds": 0.0053336, "MemoryConsumedBytes": 19280, "APIRequestsIssued": 1, "HttpRequestsIssued": 0, "Error": { "Error": "CloudScriptAPIRequestError", "Message": "The script called a PlayFab API, which returned an error. See the Error logs for details.", "StackTrace": "Error\n at Object.server_request (Script:180:24)\n at Object.server.SendPushNotification (Script:597:77)\n at GlobalSendNotification_internal (91E7F-main.js:7872:12)\n at handlers.GlobalSendNotification (91E7F-main.js:7868:12)\n at Object.invokeFunction (Script:116:33)" } }
What is the correct way of sending push notification with payload for ios?