iOS Notifications push server with php -
i have wrong notifications can't see problem. have app generates token successfully, @ first able send notification localhost device, after restored device , and tested new device token push simple notification couldn't get work though didn't made changes php code nor app code, here php code :
require_once 'apnsphp/autoload.php'; // instantiate new apnsphp_push object $push = new apnsphp_push( apnsphp_abstract::environment_sandbox, 'server_certificates_bundle_sandbox.pem' ); // set root certificate autority verify apple remote peer $push->setrootcertificationauthority('entrust_root_certification_authority.pem'); // connect apple push notification service $push->connect(); // instantiate new message single recipient $message = new apnsphp_message($token); // set simple welcome text $message->settext("gellloooooo"); // play default sound $message->setsound(); // add message message queue $push->add($message); $push->send(); $push->disconnect(); // examine error message container $aerrorqueue = $push->geterrors(); var_dump($aerrorqueue);
i think have certificates i'm not sure issues since working before , there nothing in $aerrorqueue
, empty array.
Comments
Post a Comment