PHPackages                             granam/safari-push-notifications - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. granam/safari-push-notifications

ActiveProject[Mail &amp; Notifications](/categories/mail)

granam/safari-push-notifications
================================

Creates push package for Apple / Safari web push notifications

1.0.6(8y ago)122MITPHPPHP &gt;=7.0

Since Jan 8Pushed 8y ago2 watchersCompare

[ Source](https://github.com/granam/safari-push-notificatons-package)[ Packagist](https://packagist.org/packages/granam/safari-push-notifications)[ Docs](https://github.com/jaroslavtyc/granam-apple-push-package)[ RSS](/packages/granam-safari-push-notifications/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (9)Used By (0)

Apple OS X (Mac OS) Safari push notifications
=============================================

[](#apple-os-x-mac-os-safari-push-notifications)

Heavily inspired by [connorlacombe/Safari-Push-Notifications/](https://github.com/connorlacombe/Safari-Push-Notifications/).

Flow
----

[](#flow)

On your Javascript command, by calling `pushSafariNotification`([webServiceId](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html#//apple_ref/doc/uid/TP40013225-CH3-SW33), [webServiceUrl](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html#//apple_ref/doc/uid/TP40013225-CH3-SW4), serverPushUrl, userId, title, text, buttonText)

- browser will check if is Safari of sufficient version ([OS X v10.9 and later](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/NotificationProgrammingGuideForWebsites/PushNotifications/PushNotifications.html))
- if user already allowed push notifications
    - then push notification **is** send
- else if user already denied push notifications
    - then push notification is **not** sent (to find out if push notifications can be sent, call JS function `hasUserAllowedPushNotifications`)
- if user does not YET decided to add or deny permissions to your side to send a push notification, it will
    - trigger JS event `safariPushNotificationsPermissionsRequestStart` on window JS object
    - then asks user for permissions to accept push notifications from your side via Safari build-in layout
        - then, if user *agreed*, Apple will send POST request to `\Granam\Safari\PushPackageController::pushPackages` by calling an URL you set via Apple developer console
        - then Apple will send user decision to `\Granam\Safari\PushPackageController::devicesRegistrations` by calling an URL you set via Apple developer console
        - then - if user *agreed*- thenJS event `safariPushNotificationsPermissionsJustGranted` is triggered on window object - then push notification **is** send
            - else if user *declined*, then JS event `safariPushNotificationsPermissionsJustDenied` is triggered on window object and push notification is **not** sent
    - then JS event `safariPushNotificationsPermissionsRequestEnd` is triggered on window object

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

8

Last Release

3043d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e35d11c9a75584084f0dc0ba1a3b6ff03355777809cbe8eabd20a88ac00f794?d=identicon)[jaroslavtyc](/maintainers/jaroslavtyc)

---

Top Contributors

[![jaroslavtyc](https://avatars.githubusercontent.com/u/2290225?v=4)](https://github.com/jaroslavtyc "jaroslavtyc (23 commits)")

---

Tags

applemacosnotificationspackagepushsafariphppackagepushappleapnsossafarios x

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/granam-safari-push-notifications/health.svg)

```
[![Health](https://phpackages.com/badges/granam-safari-push-notifications/health.svg)](https://phpackages.com/packages/granam-safari-push-notifications)
```

###  Alternatives

[sly/notification-pusher

Standalone PHP library for easy devices notifications push.

1.2k2.8M15](/packages/sly-notification-pusher)[m2mobi/apns-php

Apple Push Notification &amp; Feedback Provider

1118.2k1](/packages/m2mobi-apns-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
