Skip to content

Push notiication not working on Ios #150

@balvinderimpinge

Description

@balvinderimpinge

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": []
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions