PHP how to create JSON with localization arguments for APNS -
i want send json in apns following:
{ "aps" : { "alert" : { "loc-key" : "game_play_request_format", "loc-args" : [ "jenna", "frank"] }, "sound" : "default" }, }
can explaine how can create in php?
i have following json without key/args:
$body['aps'] = array( 'alert ' => 'this messsage', 'sound' => 'default' ); $payload = json_encode($body);
i have tried replace 'this message' array loc-key , loc-args not work. jus putting in data string not work..
hope can me. have tried multiple options , variations nothing works..
$body = array( "aps" => array( "alert" => array( "loc-key" => "game_play_request_format", "loc-args" => array( "jenna", "frank" ) ), "sound" => "default", ), ); echo json_encode($body);
Comments
Post a Comment