Oracle Help Center | Oracle Push Cloud Service (Standalone) title

iOS (APNs)

Each push notification includes a payload. The payload contains information about how the system should alert the user, as well as any custom data you provide.

Push IO allows you to send data to your app using JSON key pairs. These pairs are contained within the payload parameter in your POST command (see the Server API topic for details on sending via RESTful API).

 

NOTE: The maximum payload size for an APNs notification is 256 bytes. Apple Push Notification Services refuses any notification that exceeds this limit. Push IO also reserves a portion of this payload for engagement tracking and other mandatory metrics. Furthermore, each platform supports slightly different sets of features. For instance, Android does not have a badge parameter, while iOS does.

 

payload_apns:

Parameter Description
"alert" The text that will be displayed in the notification.
"alert" : "Welcome to Push IO!"
"badge" The number that will appear over the top left corner of an app’s icon. Badges must be integers.
"badge" : "1"
"sound" The name of the sound file to be played when the notification arrives. This file must be contained in your app’s bundle and the file extension (.wav, .caf, etc.) must be included in the payload.
"sound" : "default.wav"
"aps_extra" iOS specific key/value pairs (provided in JSON) that are inserted into the 'aps' payload. This is most useful for apps that need to trigger background content downloading or for changing the ACTION-LOC-KEY displayed on the notification alert:
"content-available" : 1
"alert" : { "body" : "Your Message", "action-loc-key" : "Click Me" }
"extra" iOS specific key/value pairs (provided in JSON) that are passed along with the 'aps' payload. If any value is provided for this it will override the entire payload-level extra values; that is, the value is not merged with the extra data in the parent platform object.
"url" : "www.apple.com"

Example APNs Payload:

payload={"payload_apns":
{
"alert":"Your Message",
"badge":"1",
"sound":"default.wav"
}
}

Example APNs Payload with Action-Loc-Key:

payload={"payload_apns":
{
    "aps_extra":
{
        "alert" : {
            "body" : "Do you want to play with Mike?",
            "action-loc-key" : "PLAY"
},
    "badge" : 5,
}
}
}

More information on APNs payloads can be found in the Payload Key Reference topic in the "Local and Remote Notification Programming Guide" of the iOS Developer Library. This topic contains details on the aps dictionary and the alert property as well.