Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push notiication not working on Ios #150

Open
balvinderimpinge opened this issue Jan 14, 2022 · 0 comments
Open

Push notiication not working on Ios #150

balvinderimpinge opened this issue Jan 14, 2022 · 0 comments

Comments

@balvinderimpinge
Copy link

This is my ios push notification code.I am getting success while send ios push notifications but not getting any notification .

//code for push notifiation
$push = new PushNotification('apn');
$push->setMessage([
'aps' => [
'alert' => [
'title' => $topic,
'body' => $body
],
'sound' => 'default',
'badge' => 1

            ],
             'extraPayLoad' => [
                 'custom' => 'My custom data',
             ]

]);
$push->setDevicesToken($device_token);
$push->send();

//apn settings
'apn' => [
'certificate' => DIR . '/iosCertificates/pushNew.pem',
'passPhrase' => '',
'dry_run' => true,
],

// response:
{
"success": 1,
"failure": 0,
"tokenFailList": []
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant