Skip to content

Instantly share code, notes, and snippets.

@iamcal
Created August 6, 2013 23:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamcal/6169622 to your computer and use it in GitHub Desktop.
Save iamcal/6169622 to your computer and use it in GitHub Desktop.
Using Emoji with ApnsPHP
<?php
require_once 'ApnsPHP/Autoload.php';
$message = new ApnsPHP_Message('1234567890123456789012345678901234567890123456789012345678901234');
$message->setText("Hello \\uD83D\\uDCC5");
print_r($message->getPayload());
echo "\n";
Expected output:
{"aps":{"alert":"Hello \\uD83D\\uDCC5"}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment