2017 © Pedro Peláez
 

library fastapns

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

image

samtny/fastapns

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

  • Tuesday, April 19, 2016
  • by samtny
  • Repository
  • 1 Watchers
  • 1 Stars
  • 510 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 4 % Grown

The README.md

FastAPNS Latest Stable Version Total Downloads SensioLabsInsight Scrutinizer Code Quality

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

Inspired by this StackOverflow post:, (*2)

http://stackoverflow.com/a/18491136/1569360, (*3)

... and careful reading of 'Troubleshooting Push Notifications' here:, (*4)

https://developer.apple.com/library/ios/technotes/tn2265/_index.html#//apple_ref/doc/uid/DTS40010376-CH1-TNTAG44, (*5)

Example Usage:, (*6)

$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., (*7)

END, (*8)

The Versions

19/04 2016

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Sam Thompson

apple ios apns xcode

19/04 2016

1.0.4

1.0.4.0

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

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Sam Thompson

apple ios apns xcode

18/04 2016

1.0.3

1.0.3.0

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

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Sam Thompson

apple ios apns xcode

18/04 2016

1.0.2

1.0.2.0

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

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Sam Thompson

apple ios apns xcode

18/04 2016

dev-develop

dev-develop

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

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Sam Thompson

apple ios apns xcode

18/04 2016

1.0.1

1.0.1.0

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

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Sam Thompson

apple ios apns xcode

18/04 2016

1.0.0

1.0.0.0

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

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Sam Thompson

apple ios apns xcode