2017 © Pedro Peláez
 

library apn-push

Fork of apn-push

image

davibr/apn-push

Fork of apn-push

  • Wednesday, April 26, 2017
  • by davibr
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 22 Forks
  • 0 Open issues
  • 17 Versions
  • 0 % Grown

The README.md

Apple Apn Push

SensioLabsInsight Scrutinizer Code Quality Build Status, (*1)

Send push notifications to apple devices (iPhone, iPad, iPod)., (*2)

Requirements

Now library work only with HTTP/2 protocol, and next libraries is necessary:, (*3)

  • cURL
  • The protocol HTTP/2 must be supported in cURL.

Installation

Add AppleApnPush in your composer.json:, (*4)

{
    "require": {
        "apple/apn-push": "~3.0.0"
    }
}

Now tell composer to download the library by running the command:, (*5)

$ php composer.phar update apple/apn-push

Easy usage

You can use builder for create sender for next send push notifications to device:, (*6)

<?php

use Apple\ApnPush\Certificate\Certificate;
use Apple\ApnPush\Protocol\Http\Authenticator\CertificateAuthenticator;
use Apple\ApnPush\Sender\Builder\Http20Builder;
use Apple\ApnPush\Model\Alert;
use Apple\ApnPush\Model\Aps;
use Apple\ApnPush\Model\Payload;
use Apple\ApnPush\Model\Notification;
use Apple\ApnPush\Model\DeviceToken;
use Apple\ApnPush\Model\Receiver;
use Apple\ApnPush\Exception\SendNotification\SendNotificationException;

// Create certificate and authenticator
$certificate = new Certificate(__DIR__.'/cert.pem', '');
$authenticator = new CertificateAuthenticator($certificate);

// Build sender
$builder = new Http20Builder($authenticator);
$builder->addDefaultVisitors();

$sender = $builder->build();

// Create payload
$alert = new Alert('hello ;)');
$aps = new Aps($alert);
$payload = new Payload($aps);

// Create notification
$notification = new Notification($payload);

$receiver = new Receiver(
    new DeviceToken('6b4d687c1292f1ff05b5653951be4e5f838ce6d39d6b1be1801fe8dcc35713c9'),
    'you.app.id'
);

try {
    $sender->send($receiver, $notification);
} catch (SendNotificationException $e) {
    print 'Fail send message: '.$e->getMessage()."\n";
}

License

This library is under the MIT license. See the complete license in library, (*7)

LICENSE

Reporting an issue or a feature request

Issues and feature requests are tracked in the Github issue tracker., (*8)

Contributors:

Thanks to [everyone participating] (https://github.com/ZhukV/AppleApnPush/graphs/contributors) in the development of this AppleApnPush library!, (*9)

  • Ryan Martinsen [popthestack] (https://github.com/popthestack)

The Versions

26/04 2017

dev-master

9999999-dev https://github.com/davibr/AppleApnPush

Fork of apn-push

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Vitaliy Zhuk
by Davi Rodrigues

apple push notifications apn

26/04 2017

dev-b2.2.3

dev-b2.2.3 https://github.com/davibr/AppleApnPush

Fork of apn-push

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Vitaliy Zhuk
by Davi Rodrigues

apple push notifications apn

26/04 2017

v2.2.3

2.2.3.0 https://github.com/davibr/AppleApnPush

Fork of apn-push

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Vitaliy Zhuk
by Davi Rodrigues

apple push notifications apn

26/12 2016

v3.0.0

3.0.0.0 https://github.com/ZhukV/AppleApnPush

Push notifications to Apple devices

  Sources   Download

MIT

The Requires

  • php ^7.0
  • ext-curl *

 

The Development Requires

by Vitaliy Zhuk

apple push notifications apn

23/09 2016

2.0.x-dev

2.0.9999999.9999999-dev https://github.com/ZhukV/AppleApnPush

Push notifications to Apple devices

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Vitaliy Zhuk

apple push notifications apn

11/11 2015

v2.2.2

2.2.2.0 https://github.com/ZhukV/AppleApnPush

Push notifications to Apple devices

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Vitaliy Zhuk

apple push notifications apn

09/11 2015

v2.2.1

2.2.1.0 https://github.com/ZhukV/AppleApnPush

Push notifications to Apple devices

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Vitaliy Zhuk

apple push notifications apn

09/11 2015

v2.2.0

2.2.0.0 https://github.com/ZhukV/AppleApnPush

Push notifications to Apple devices

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Vitaliy Zhuk

apple push notifications apn

19/08 2015

v2.1.6

2.1.6.0 https://github.com/ZhukV/AppleApnPush

Push notifications to Apple devices

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Vitaliy Zhuk

apple push notifications apn

07/04 2015

v2.1.5

2.1.5.0 https://github.com/ZhukV/AppleApnPush

Push notifications to Apple devices

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Vitaliy Zhuk

apple push notifications apn

02/04 2015

v2.1.4

2.1.4.0 https://github.com/ZhukV/AppleApnPush

Push notifications to Apple devices

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Vitaliy Zhuk

apple push notifications apn

31/07 2014

v2.1.3

2.1.3.0 https://github.com/ZhukV/AppleApnPush

Push notifications to Apple devices

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Vitaliy Zhuk

apple push notifications apn

30/07 2014

v2.1.2

2.1.2.0 https://github.com/ZhukV/AppleApnPush

Push notifications to Apple devices

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Vitaliy Zhuk

apple push notifications apn

28/07 2014

v2.1.1

2.1.1.0 https://github.com/ZhukV/AppleApnPush

Push notifications to Apple devices

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Vitaliy Zhuk

apple push notifications apn

18/07 2014

v2.0.2

2.0.2.0 https://github.com/ZhukV/AppleApnPush

Push notifications to Apple devices

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Vitaliy Zhuk

apple push notifications apn

06/05 2014

v2.0.1

2.0.1.0 https://github.com/ZhukV/AppleApnPush

Push notifications to Apple devices

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Vitaliy Zhuk

apple push notifications apn

09/11 2013

v2.0

2.0.0.0 https://github.com/ZhukV/AppleApnPush

Push notifications to Apple devices

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

by Vitaliy Zhuk

apple push notifications apn