I don't know why notifications are not sent from server, I made a sample notification script, which works properly.
But it does not works from the Spika App.
What i can see is in the file Spika-Server/src/Spika/Provider/PushNotificationProvider.php
it never enters any of this conditions. Please help.
$app['sendProdAPN'] = $app->protect(function($tokens,$payload) use ($self,$app) {
$app['monolog']->addDebug("-----------Sending Production------------");
$self->sendAPN($app['pushnotification.options']['APNProdPem'],$tokens,$payload,'ssl://gateway.push.apple.com:2195',$app);
});
$app['sendDevAPN'] = $app->protect(function($tokens,$payload) use ($self,$app) {
$app['monolog']->addDebug("-----------Sending DEV------------");
$self->sendAPN($app['pushnotification.options']['APNDevPem'],$tokens,$payload,'ssl://gateway.sandbox.push.apple.com:2195',$app);
});
$app['sendGCM'] = $app->protect(function($payload) use ($self,$app) {
$app['monolog']->addDebug("-----------ANDROID------------");
$self->sendGCM($app['pushnotification.options']['GCMAPIKey'],$payload,$app);
});
And it is not even coming under, Spika-Server/src/Spika/Controller/AsyncTaskController.php
$controllers->post('/notifyNewDirectMessage', function (Request $request) use ($self,$app) {
$app['monolog']->addDebug("-----------Sending Step 0------------");
}
Please help.