PHPackages                             teknasyon/apple-push-notif - 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. teknasyon/apple-push-notif

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

teknasyon/apple-push-notif
==========================

Apple Push Notification &amp; Feedback Provider

1.0.4(7y ago)04.7kBSD-3-ClausePHPPHP &gt;=5.3.0

Since Jun 6Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Teknasyon-Teknoloji/ApnsPHP)[ Packagist](https://packagist.org/packages/teknasyon/apple-push-notif)[ Docs](https://github.com/Teknasyon-Teknoloji/ApnsPHP.git)[ RSS](/packages/teknasyon-apple-push-notif/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (4)Used By (0)

[![](https://camo.githubusercontent.com/2e181bc96fa278cb52fa53e84a08c1776ec4c052be41354608ac0129b79d8966/687474703a2f2f696d6d6f62696c696172652e6769746875622e696f2f41706e735048502f696d616765732f6c6f676f2e706e67)](https://camo.githubusercontent.com/2e181bc96fa278cb52fa53e84a08c1776ec4c052be41354608ac0129b79d8966/687474703a2f2f696d6d6f62696c696172652e6769746875622e696f2f41706e735048502f696d616765732f6c6f676f2e706e67) ApnsPHP: Apple Push Notification &amp; Feedback Provider
==========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

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

 [![](https://camo.githubusercontent.com/d9a9ba08c5d755a87324aec287f8f32c0c736b4181e8c997b9a28d155def39dd/68747470733a2f2f706f7365722e707567782e6f72672f64756363696f2f61706e732d7068702f646f776e6c6f616473)](https://camo.githubusercontent.com/d9a9ba08c5d755a87324aec287f8f32c0c736b4181e8c997b9a28d155def39dd/68747470733a2f2f706f7365722e707567782e6f72672f64756363696f2f61706e732d7068702f646f776e6c6f616473) [![](https://camo.githubusercontent.com/65e0e12be139daa6798d43e9dd7160ab72e7631d4b2e15f27d886f5748d5bfb9/68747470733a2f2f706f7365722e707567782e6f72672f64756363696f2f61706e732d7068702f642f6d6f6e74686c79)](https://camo.githubusercontent.com/65e0e12be139daa6798d43e9dd7160ab72e7631d4b2e15f27d886f5748d5bfb9/68747470733a2f2f706f7365722e707567782e6f72672f64756363696f2f61706e732d7068702f642f6d6f6e74686c79) [![](https://camo.githubusercontent.com/e0ce6d51d1c05f290e78742c08a2ec8d5fc0676dc72b1bf15d7e5884f7bdffe7/68747470733a2f2f706f7365722e707567782e6f72672f64756363696f2f61706e732d7068702f642f6461696c79)](https://camo.githubusercontent.com/e0ce6d51d1c05f290e78742c08a2ec8d5fc0676dc72b1bf15d7e5884f7bdffe7/68747470733a2f2f706f7365722e707567782e6f72672f64756363696f2f61706e732d7068702f642f6461696c79) [![](https://camo.githubusercontent.com/3276207248f98e463e8739043749c87e10293bdc3cbd4e3ab723ec0d02f8f570/68747470733a2f2f706f7365722e707567782e6f72672f64756363696f2f61706e732d7068702f6c6963656e7365)](https://camo.githubusercontent.com/3276207248f98e463e8739043749c87e10293bdc3cbd4e3ab723ec0d02f8f570/68747470733a2f2f706f7365722e707567782e6f72672f64756363696f2f61706e732d7068702f6c6963656e7365)

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

- [Sample PHP Push code](sample_push.php)
- [Sample PHP Feedback code](sample_feedback.php)
- [Sample PHP Server code](sample_server.php)
- [Sample Objective-C device code](Objective-C%20Demo/)
- [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)

News
----

[](#news)

- **June 1, 2016**, First implementation of the HTTP/2 Protocol, please download [this package](https://github.com/immobiliare/ApnsPHP/releases/tag/v2.0.0-alpha) (please check if you have CURL with HTTP2 support built in your PHP version and generate a new certificate, you cannot use the same as binary version: [Creating a Universal Push Notification Client SSL Certificate](https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/AddingCapabilities/AddingCapabilities.html#//apple_ref/doc/uid/TP40012582-CH26-SW11)).
- **September 29, 2015**, Some stats on this README.md, thanks [Badge Poser](https://poser.pugx.org).
- **May 12, 2015**, ApnsPHP has been moved to the [Immobiliare Labs](https://github.com/immobiliare) organization on github.
- **May 07, 2015**, ApnsPHP has increased the default payload size to 2048 and is now using the TLS protocol by default instead of the old SSL. News from Apple:
- **October 26, 2012**, Project source code has moved to [github](https://github.com/immobiliare/ApnsPHP).
- **June 18, 2011**, Please, use [ApnsPHP Google Group](https://groups.google.com/group/apns-php) for help requests or to discuss about this project. To report an issue use [Issues](https://github.com/immobiliare/ApnsPHP/issues). Thanks!
- **December 18, 2010**, Full APNs message support: message body, localized action button, localized message with arguments substitution and custom launch images.
- **December 15, 2010**, Committed the first version of the Objective-C Demo Project with not-running, running in foreground and running in background application state support.
- **December 14, 2010**, Added the support for multiple Custom Property.
- **August 28, 2010**, Added support for the new APNs enhanced format that addresses some of the issues with the simple format: *Notification expiry* and *Error response*.
- **February 28, 2010**, ApnsPHP Source Code is now available.

Packagist
---------

[](#packagist)

Thanks @jbender!

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

[](#architecture)

- **Autoload system**, explicitly include only Autoload.php and all classes are loaded on-demand.
- **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.
- **Objective-C Demo Project** with not-running, running in foreground and running in background application state support.

Classes hierarchy
-----------------

[](#classes-hierarchy)

[![](https://camo.githubusercontent.com/1e085ace5d9d5cac7976bd72697b1a27e26fb2b7075430ef93d178a81e34b240/687474703a2f2f696d6d6f62696c696172652e6769746875622e696f2f41706e735048502f696d616765732f636c6173736573312e706e67)](https://camo.githubusercontent.com/1e085ace5d9d5cac7976bd72697b1a27e26fb2b7075430ef93d178a81e34b240/687474703a2f2f696d6d6f62696c696172652e6769746875622e696f2f41706e735048502f696d616765732f636c6173736573312e706e67)[![](https://camo.githubusercontent.com/4310ecc7e87496e27942a7bb897aeaf374474fc57de47fbba7d1dc0f849cb9d3/687474703a2f2f696d6d6f62696c696172652e6769746875622e696f2f41706e735048502f696d616765732f636c6173736573322e706e67)](https://camo.githubusercontent.com/4310ecc7e87496e27942a7bb897aeaf374474fc57de47fbba7d1dc0f849cb9d3/687474703a2f2f696d6d6f62696c696172652e6769746875622e696f2f41706e735048502f696d616765732f636c6173736573322e706e67)[![](https://camo.githubusercontent.com/1b227fe307645459efeeeaebefbdd3bf3fc0a56e73d477aed710c321f0962876/687474703a2f2f696d6d6f62696c696172652e6769746875622e696f2f41706e735048502f696d616765732f636c6173736573332e706e67)](https://camo.githubusercontent.com/1b227fe307645459efeeeaebefbdd3bf3fc0a56e73d477aed710c321f0962876/687474703a2f2f696d6d6f62696c696172652e6769746875622e696f2f41706e735048502f696d616765732f636c6173736573332e706e67)

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 5.3.0 or later with OpenSSL, PCNTL, System V shared memory and semaphore support.

```
./configure --with-openssl[=PATH] --enable-pcntl --enable-sysvshm --enable-sysvsem

```

If you plan to use only Push and Feedback provider without the Server part you need only OpenSSL (no PCNTL, System V shared memory or semaphore):

```
./configure --with-openssl[=PATH]

```

*Usually OpenSSL is built-in in standard PHP Linux distributions packages. Standard PHP 5.3.0 shipped with Mac OS X Snow Leopard just works.*

Please...
---------

[](#please)

... drop a line if you use ApnsPHP for your published application on the App Store! Thanks :-)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 81.5% 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 ~509 days

Total

2

Last Release

2619d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e58dd08a2f1ba99ab0c1539dd799ca43061814342f92dc1e34969a610ebf4f06?d=identicon)[teknasyon](/maintainers/teknasyon)

---

Top Contributors

[![duccio](https://avatars.githubusercontent.com/u/335206?v=4)](https://github.com/duccio "duccio (88 commits)")[![fustundag](https://avatars.githubusercontent.com/u/841630?v=4)](https://github.com/fustundag "fustundag (4 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)")[![aporat](https://avatars.githubusercontent.com/u/415576?v=4)](https://github.com/aporat "aporat (2 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)")[![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)")[![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)")

---

Tags

pushnotificationappleapns

### Embed Badge

![Health badge](/badges/teknasyon-apple-push-notif/health.svg)

```
[![Health](https://phpackages.com/badges/teknasyon-apple-push-notif/health.svg)](https://phpackages.com/packages/teknasyon-apple-push-notif)
```

###  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)
