Pubnub PHP message format for ios push notification -
per pubnub php sdk publish message json object on pubnub subscribed devices this:
<?php $payload = array( "pn_apns"=>array( "aps"=>array( "alert"=>array( "title"=>"this title", "body"=>"this actual message" ), "badge"=>1 )), "message"=>"this embedded message", "data"=>array("my_key_1"=>"my_val_1") ); $info = $pubnub->publish("my_channel_1", json_encode($payload); print_r($info);
the problem background apple push notification alert on actual device not formatted title , text message this:
this title
this actual message
...but instead displayed raw json text this:
{"pn_apns":{"aps":{"alert":{"title":"this title","body":"this actual message"} ...
i using javascript sdk (angularjs) , phonegap push notification plugin on device.
how format apple push alert message in php?
Comments
Post a Comment