2017 © Pedro Peláez
 

yii2-extension yii2-apns

Extension for sending Apple push notification

image

tecsvit/yii2-apns

Extension for sending Apple push notification

  • Tuesday, July 24, 2018
  • by fa2mm
  • Repository
  • 1 Watchers
  • 0 Stars
  • 34 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 17 % Grown

The README.md

Yii2 APNs Extension

Extension for sending Apple push notification, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist tecsvit/yii2-apns "*"

or add, (*4)

"tecsvit/yii2-apns": "*"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by:, (*6)

into config file:, (*7)

'components' => [
    ...
    'apns' => [
        'class' => '\tecsvit\apns\src\Sender',
        'apnsHostProd'  => 'gateway.push.apple.com',
        'apnsHostTest'  => 'gateway.sandbox.push.apple.com',
        'apnsPort'      => 2195,
        'apnsCertProd'  => dirname(__DIR__) . '/path/to/prod-serc/apple_push_notification_production.pem',
        'apnsCertTest'  => dirname(__DIR__) . '/path/to/test-serc/apple_push_notification_test.pem',
        'apnsPassphrase'=> dirname(__DIR__) . '/path/to/passphare',
        'timeout'       => 500000, //microseconds,
        'mode'          => 'prod' //'prod', 'dev' or 'test', default 'dev'
    ],
    ...
]

into your code:, (*8)

/**
 * @param array $alert Example: ['alert' => 'Push Message'] 
 * @param string $token Apple token device
 * @param bool $closeAfterPush Close the connection after the push?
 */
Yii::$app->apns->send($alert, $token, $closeAfterPush); ?>

The Versions

24/07 2018

dev-master

9999999-dev

Extension for sending Apple push notification

  Sources   Download

Apache-2.0

The Requires

 

by Tecsvit

extension yii2 apns

24/07 2018

v1.1.0

1.1.0.0

Extension for sending Apple push notification

  Sources   Download

Apache-2.0

The Requires

 

by Tecsvit

extension yii2 apns

05/12 2017

v1.1.0.x-dev

1.1.0.9999999-dev

Extension for sending Apple push notification

  Sources   Download

Apache-2.0

The Requires

 

by Tecsvit

extension yii2 apns