question

Ian Oliver avatar image
Ian Oliver asked

iOS SendPushNotification Payload

I've been experimenting with the SendPushNotification server API and I was wondering if it was possible to customize the actual notification by adding to it's payload.

Specifically, I am getting a notification on device like so:

{ aps: { alert: "Test message" } }

But I would like to be able to customize the payload to include more useful information for my app (mainly to handle the notification in the background):

{ 
    aps: { alert: "Test message" },
    myKey: { eventType: "coinsUpdated" }
}

My understanding is that "myKey" should appear in Unity3D's Notification.userInfo hash -- assuming that I can get playfab to pass "myKey" to the client.

I've tried adding arbitrary keys to the SendPushNotification request to no avail. I am hoping there is some way to provide payload information.

Is this possible with the current implementation of SendPushNotification?

Push Notifications
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

We do currently support advanced Push Notifications for Android: https://api.playfab.com/docs/push-for-android/. We'll be adding support for it on iOS as soon as we can as well.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ryan avatar image ryan commented ·

Any update on when Advanced Push Notifications for iOS might be available? We need this to make it easier to launch into one of our multiplayer games from an invite. Is there a feature request page where we can track these sort of items?

0 Likes 0 ·
brendan avatar image brendan ryan commented ·

Sorry, but until we're actively working on a backlog item, we can't really provide a date for it, as our schedule can change quite a bit from sprint to sprint (due to the needs of the live service).

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.