Reputation: 147
As you may know, on the PushNotificationPayload.aps file, actions can be set on the "WatchKit Simulator Actions" node.
Can someone provide me a real push notification payload that includes actions?
Thanks!
Upvotes: 0
Views: 1004
Reputation: 3523
We use a test payload that looks something like this:
{
"aps": {
"alert": {
"title": "My Alert Title",
"body": "The body message",
},
"category": "myCategoryName"
},
"WatchKit Simulator Actions": [
{
"title": "Like it!",
"identifier": "MY_LIKE_ACTION"
}
],
"myCategoryDictionary": {
"image" : "http://.....",
"subject" : "The subject of the alert message",
"content": "Detailed content info can go here"
},
"customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App."
}
Upvotes: 1