PHPackages                             samtny/fastapns - 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. samtny/fastapns

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

samtny/fastapns
===============

Library for pushing APNs notifications to Apple's servers at warp speed

1.0.4(9y ago)1554MITPHPPHP &gt;=5.4.0

Since Apr 18Pushed 9y ago1 watchersCompare

[ Source](https://github.com/samtny/fastapns)[ Packagist](https://packagist.org/packages/samtny/fastapns)[ RSS](/packages/samtny-fastapns/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (7)Used By (0)

FastAPNS [![Latest Stable Version](https://camo.githubusercontent.com/73f4566bbe643cf86970e6f90ca2af8a798575f3413a0a230d4690758716439e/68747470733a2f2f706f7365722e707567782e6f72672f73616d746e792f6661737461706e732f762f737461626c65)](https://packagist.org/packages/samtny/fastapns) [![Total Downloads](https://camo.githubusercontent.com/ed27ae83f7998d7d63d53bb498c136e739b4730186fb7a9d04d1108b3e10f6be/68747470733a2f2f706f7365722e707567782e6f72672f73616d746e792f6661737461706e732f646f776e6c6f616473)](https://packagist.org/packages/samtny/fastapns) [![SensioLabsInsight](https://camo.githubusercontent.com/d648f552fbff6979bdec4dce1964e088bfa4193f2bb2738ab959ff1bba4aefe2/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f36663833353263382d376364652d343231622d623364302d3038616465316564373662632f6d696e692e706e67)](https://insight.sensiolabs.com/projects/6f8352c8-7cde-421b-b3d0-08ade1ed76bc) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/52f90157f60555021d989028592d80fe04d7306034f1a32de1b3a1cdb3d49fca/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73616d746e792f6661737461706e732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/samtny/fastapns/?branch=master)
====================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#fastapns----)

This library will send push notifications to Apple as fast as possible, and report any bad tokens.

Inspired by this StackOverflow post:

... and careful reading of 'Troubleshooting Push Notifications' here:

[https://developer.apple.com/library/ios/technotes/tn2265/\_index.html#//apple\_ref/doc/uid/DTS40010376-CH1-TNTAG44](https://developer.apple.com/library/ios/technotes/tn2265/_index.html#//apple_ref/doc/uid/DTS40010376-CH1-TNTAG44)

Example Usage:

```
$payload = array(
    'aps' => array(
        'alert' => 'some alert',
    ),
);

$tokens = array(
    'ca360e9029938b9ed8ed435640f3760620526bd72037017d3c50cfa264b7914f',
    'ca360e9029938b9ed8ed435640f3760620526bd72037017d3c50cfa264b79150',
    'ca360e9029938b9ed8ed435640f3760620526bd72037017d3c50cfa264b79151',
    'ca360e9029938b9ed8ed435640f3760620526bd72037017d3c50cfa264b79152',
    'ca360e9029938b9ed8ed435640f3760620526bd72037017d3c50cfa264b79153',
);

$expiry = (new \DateTime('+24 hours'))->getTimestamp();

$client = FastAPNS\ClientBuilder::create()
    ->setLocalCert(__DIR__ . '/ssl/MyAppCertificate.includesprivatekey.pem')
    ->setPassphrase('p@ssword')
    ->build();

$client->send($payload, $tokens, $expiry);

var_dump($client->getBadTokens());
```

Ensure that your APNS certificate is encoded in PEM format and includes the private key. This file should be set to mode 0400.

END

###  Health Score

29

—

LowBetter than 63% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 77.8% 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

5

Last Release

3624d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/95ee10c1e49896bc7d3682dc7b2e96076317775908126de08b39dbaec05eca48?d=identicon)[samtny](/maintainers/samtny)

---

Top Contributors

[![samtny](https://avatars.githubusercontent.com/u/132470?v=4)](https://github.com/samtny "samtny (7 commits)")[![samtdp](https://avatars.githubusercontent.com/u/22985692?v=4)](https://github.com/samtdp "samtdp (2 commits)")

---

Tags

appleapnsiosxcode

### Embed Badge

![Health badge](/badges/samtny-fastapns/health.svg)

```
[![Health](https://phpackages.com/badges/samtny-fastapns/health.svg)](https://phpackages.com/packages/samtny-fastapns)
```

###  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.8M16](/packages/sly-notification-pusher)[mcfedr/awspushbundle

A set of services to simplify using Aws to send push notifications

40376.4k1](/packages/mcfedr-awspushbundle)[m2mobi/apns-php

Apple Push Notification &amp; Feedback Provider

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

PHPackages © 2026

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