dimanche 6 août 2017

Laravel push notifications: certificate doesn't exist

I am trying to send push notifications in Laravel to an iOS application and I am using Laravel's Push Notification Package. This is my config file:

return array(

    'appNameIOS' => array(
        'environment' => 'development',
        'certificate' => base_path('app/cert/APNS_Cert_Hasalty_dev.p12'),
        'passPhrase' => '',
        'service' => 'apns'
    ),
    'appNameAndroid' => array(
        'environment' => 'production',
        'apiKey' => 'yourAPIKey',
        'service' => 'gcm'
    )

);

This is what I am doing to send the notification:

$payload = PushNotification::Message('Hello World, i`m a push message from hasalty', array(
            'badge' => 1,
            'sound' => 'default',
        ));

        PushNotification::app('appNameIOS')
            ->to($deviceToken)
            ->send($payload);

Now, the certificate file exists at the path given in the config but it throws me the error:

Certificate app/cert/APNS_Cert_Hasalty_dev.p12 does not exist

What am I doing wrong? Any help? Laravel's version is 5.3.31.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2ufIb3L
via IFTTT

Aucun commentaire:

Enregistrer un commentaire