Skip to content

Push notiication not working on Ios #150

Open
@balvinderimpinge

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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