简体   繁体   English

Laravel使用davibennun / laravel-push-notification包推送通知

[英]Laravel push Notification using davibennun/laravel-push-notification package

I am using Laravel 5.2 to sent push notifications to my IOS app using davibennun/laravel-push-notification package 我正在使用Laravel 5.2使用davibennun / laravel-push-notification包向我的IOS应用发送推送通知

I get below error when I try to sent a push notification 尝试发送推送通知时出现以下错误

AdapterException in Apns.php line 57: Certificate /path/to/certificate.pem does not exist Apns.php第57行中的AdapterException:证书/path/to/certificate.pem不存在

I have given absolute path to certificate. 我给了证书的绝对路径。 But, it doesn't work 但是,它不起作用

'appNameIOS'     => array(
        'environment' =>'development',
        'certificate' => app_path().'/Certificates_d.pem',
        'passPhrase'  =>'password',
        'service'     =>'apns'
    )

,

Can anyone please help resolve this issue. 任何人都可以帮助解决此问题。 Thanks! 谢谢!

Make sure the file permissions for the pem files are (0644), also pem file must be inside app folder here how i set path, normally i keep files in pem directory inside app folder. 确保pem文件的文件权限为(0644),并且pem文件也必须位于应用程序文件夹中,在这里,我如何设置路径,通常我会将文件保存在应用程序文件夹中的pem目录中。

'certificate' => app_path()."/pem/apns-pro.pem", 'certificate'=> app_path()。“ / pem / apns-pro.pem”,

file permissions must be 0644 for the file this is important. 文件的文件权限必须为0644,这一点很重要。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM