PHPackages                             protonlabs/apns-php - 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. protonlabs/apns-php

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

protonlabs/apns-php
===================

Apple Push Notification &amp; Feedback Provider

2.2.3(4y ago)733.3k↓25.9%3[3 PRs](https://github.com/ProtonMail/ApnsPHP/pulls)BSD-3-ClausePHPPHP &gt;=7.4

Since Feb 4Pushed 2y agoCompare

[ Source](https://github.com/ProtonMail/ApnsPHP)[ Packagist](https://packagist.org/packages/protonlabs/apns-php)[ Docs](https://github.com/ProtonMail/ApnsPHP)[ RSS](/packages/protonlabs-apns-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (5)Versions (19)Used By (0)

ApnsPHP: Apple Push Notification &amp; Feedback Provider
========================================================

[](#apnsphp-apple-push-notification--feedback-provider)

[![PHP Tests](https://github.com/ProtonMail/ApnsPHP/actions/workflows/php-tests.yml/badge.svg)](https://github.com/ProtonMail/ApnsPHP/actions/workflows/php-tests.yml)

A **full set** of *open source* PHP classes to interact with the **Apple Push Notification service** for the iPhone, iPad and the iPod Touch.

Based on  and

- [Sample PHP Push code](sample_push.php)
- [Sample PHP Feedback code](sample_feedback.php)
- [Sample PHP Server code](sample_server.php)
- [Full APIs Documentation](http://immobiliare.github.io/ApnsPHP/html/index.html)
- [How to generate a Push Notification certificate and download the Entrust Root Authority certificate](Doc/CertificateCreation.md)

Packagist
---------

[](#packagist)

```
composer req protonlabs/apns-php

```

Architecture
------------

[](#architecture)

- **Message class**, to build a notification payload.
- **Push class**, to push one or more messages to Apple Push Notification service.
- **Feedback class**, to query the Apple Feedback service to get the list of broken device tokens.
- **Push Server class**, to create a Push Server with one or more (forked) processes reading from a common message queue.
- **Log class/interface**, to log to standard output or for custom logging purpose (supports loggers implementing the PSR-3 logger interface).

Details
-------

[](#details)

In the Apple Push Notification Binary protocol there isn't a real-time feedback about the correctness of notifications pushed to the server. So, after each write to the server, the Push class waits for the "read stream" to change its status (or at least N microseconds); if it happened and the client socket receives an "end-of-file" from the server, the notification pushed to the server was broken, the Apple server has closed the connection and the client needs to reconnect to send other notifications still on the message queue.

To speed-up the sending activities the Push Server class can be used to create a Push Notification Server with many processes that reads a common message queue and sends parallel Push Notifications.

All client-server activities are based on the "on error, retry" pattern with customizable timeouts, retry times and retry intervals.

Requirements
------------

[](#requirements)

PHP 7.4.0 or later with OpenSSL, PCNTL, System V shared memory and semaphore support.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 62.1% 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 ~116 days

Recently: every ~36 days

Total

8

Last Release

1483d ago

Major Versions

1.0.1.x-dev → 2.0.0beta12021-02-05

PHP version history (3 changes)1.0.1.x-devPHP &gt;=5.3.0

2.0.0beta1PHP &gt;=7.2.0

2.1.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/837170204c2dc6beffb28cfca8ff9036709ac38d5f5f16ab2b8b8a7cb025c089?d=identicon)[BafS](/maintainers/BafS)

![](https://www.gravatar.com/avatar/07337314fa7f579e749eb6f2565747bf75075974867e44153b8382999fc83a42?d=identicon)[bartbutler](/maintainers/bartbutler)

---

Top Contributors

[![duccio](https://avatars.githubusercontent.com/u/335206?v=4)](https://github.com/duccio "duccio (95 commits)")[![BafS](https://avatars.githubusercontent.com/u/588205?v=4)](https://github.com/BafS "BafS (21 commits)")[![SMillerDev](https://avatars.githubusercontent.com/u/1484494?v=4)](https://github.com/SMillerDev "SMillerDev (12 commits)")[![Martijnsvb](https://avatars.githubusercontent.com/u/38097336?v=4)](https://github.com/Martijnsvb "Martijnsvb (5 commits)")[![marcorocca](https://avatars.githubusercontent.com/u/50023343?v=4)](https://github.com/marcorocca "marcorocca (3 commits)")[![spacedevin](https://avatars.githubusercontent.com/u/27974?v=4)](https://github.com/spacedevin "spacedevin (2 commits)")[![tardypad](https://avatars.githubusercontent.com/u/6368493?v=4)](https://github.com/tardypad "tardypad (2 commits)")[![aporat](https://avatars.githubusercontent.com/u/415576?v=4)](https://github.com/aporat "aporat (2 commits)")[![jetwitaussi](https://avatars.githubusercontent.com/u/1422884?v=4)](https://github.com/jetwitaussi "jetwitaussi (1 commits)")[![potproject](https://avatars.githubusercontent.com/u/6498055?v=4)](https://github.com/potproject "potproject (1 commits)")[![pprkut](https://avatars.githubusercontent.com/u/56635?v=4)](https://github.com/pprkut "pprkut (1 commits)")[![wadxm](https://avatars.githubusercontent.com/u/9190997?v=4)](https://github.com/wadxm "wadxm (1 commits)")[![benpackard](https://avatars.githubusercontent.com/u/2280914?v=4)](https://github.com/benpackard "benpackard (1 commits)")[![danielemaiorana](https://avatars.githubusercontent.com/u/22028928?v=4)](https://github.com/danielemaiorana "danielemaiorana (1 commits)")[![edwardmp](https://avatars.githubusercontent.com/u/1686739?v=4)](https://github.com/edwardmp "edwardmp (1 commits)")[![hamidrezabstn](https://avatars.githubusercontent.com/u/5023099?v=4)](https://github.com/hamidrezabstn "hamidrezabstn (1 commits)")[![integer](https://avatars.githubusercontent.com/u/160891?v=4)](https://github.com/integer "integer (1 commits)")[![jbender](https://avatars.githubusercontent.com/u/723784?v=4)](https://github.com/jbender "jbender (1 commits)")[![JellyBellyDev](https://avatars.githubusercontent.com/u/190820?v=4)](https://github.com/JellyBellyDev "JellyBellyDev (1 commits)")

---

Tags

pushnotificationappleapns

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/protonlabs-apns-php/health.svg)

```
[![Health](https://phpackages.com/badges/protonlabs-apns-php/health.svg)](https://phpackages.com/packages/protonlabs-apns-php)
```

###  Alternatives

[duccio/apns-php

Apple Push Notification &amp; Feedback Provider

1.4k2.5M13](/packages/duccio-apns-php)[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)
