Skip to content

Instantly share code, notes, and snippets.

@mmenozzi
Created February 16, 2013 14:56
Show Gist options
  • Save mmenozzi/4967244 to your computer and use it in GitHub Desktop.
Save mmenozzi/4967244 to your computer and use it in GitHub Desktop.
APNS Payload
$body = array(
'aps' => array(
'alert' => $message,
'badge' => 1,
'sound' => 'default'
)
);
if (!is_null($section)) {
$body['section'] = $section;
}
// Encode the payload as JSON
$payload = json_encode($body);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment