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

iOS: Silent Notifications #20

Open
TCB13 opened this issue Feb 19, 2019 · 0 comments
Open

iOS: Silent Notifications #20

TCB13 opened this issue Feb 19, 2019 · 0 comments

Comments

@TCB13
Copy link

TCB13 commented Feb 19, 2019

Ability to send "silent" notifications to iOS devices.

https://stackoverflow.com/a/8949642/560745

At AppleNotification.php:61 we should check if $this->alert is empty:

 if (is_array($this->alert)) {
            if (!empty($alert)) {
                $alert   = array_intersect_key($this->alert, array_fill_keys($this->supportedAlertProperties, 0));
                $payload += ['alert' => $alert];
            }
        } else if (is_scalar($this->alert)) {
TCB13 added a commit to TCB13/notificationhubs-rest-php that referenced this issue Feb 19, 2019
Not send an `alert` to the server would result in a "silent" notification. Can be useful for notifications that the user shouldn't see.
Read more about silent notifications here: https://stackoverflow.com/a/8949642/560745
Closes webwarejp#20
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