PHPackages                             gbksoft/yii2-apnsgcm-through-rabbitmq - 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. [API Development](/categories/api)
4. /
5. gbksoft/yii2-apnsgcm-through-rabbitmq

ActiveYii2-extension[API Development](/categories/api)

gbksoft/yii2-apnsgcm-through-rabbitmq
=====================================

yii2 APNs-GCM through RabbitMQ extension

v1.0.5(10y ago)0139GPL-3.0+PHP

Since Oct 9Pushed 10y ago3 watchersCompare

[ Source](https://github.com/gbksoft/yii2-apnsgcm-through-rabbitmq)[ Packagist](https://packagist.org/packages/gbksoft/yii2-apnsgcm-through-rabbitmq)[ RSS](/packages/gbksoft-yii2-apnsgcm-through-rabbitmq/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (7)Used By (0)

yii2 APNs-Gcm through RabbitMQ
==============================

[](#yii2-apns-gcm-through-rabbitmq)

yii2 APNs-Gcm through RabbitMQ extension

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist gbksoft/yii2-apnsgcm-through-rabbitmq "*"

```

or add

```
"gbksoft/yii2-apnsgcm-through-rabbitmq": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

First of all, you need to configure the following extensions to work with RebbitMQ:

-

in your main.php your configuration would look like this

```
'components' => [
	'apns' => [
		'class' => 'gbksoft\apnsGcm\Apns',
		'environment' => \gbksoft\apnsGcm\Apns::ENVIRONMENT_SANDBOX,
		'pemFile' => dirname(__FILE__).'/apnssert/apns-dev.pem',
		// 'retryTimes' => 3,
		'options' => [
			'sendRetryTimes' => 5
		]
	],
	'gcm' => [
		'class' => 'gbksoft\apnsGcm\Gcm',
		'apiKey' => 'your_api_key',
	],
	// using both gcm and apns, make sure you have 'gcm' and 'apns' in your component
	'apnsGcm' => [
		'class' => 'gbksoft\apnsGcm\ApnsGcm',
		// custom name for the component, by default we will use 'gcm' and 'apns'
		//'gcm' => 'gcm',
		//'apns' => 'apns',
	],
]
```

Online Tester
-------------

[](#online-tester)

Please visit the link for online tester

Usage
-----

[](#usage-1)

**Usage using APNS only**

```
/* @var $apnsGcm \gbksoft\apnsGcm\Apns */
$apns = Yii::$app->apns;
$apns->send($push_tokens, $message,
  [
    'customProperty_1' => 'Hello',
    'customProperty_2' => 'World'
  ],
  [
    'sound' => 'default',
    'badge' => 1
  ]
);
```

**Usage using GCM only**

```
/* @var $apnsGcm \gbksoft\apnsGcm\Gcm */
$gcm = Yii::$app->gcm;
$gcm->send($push_tokens, $message,
  [
    'customerProperty' => 1,
  ],
  [
    'timeToLive' => 3
  ],
);
```

### Usage using APNS and GCM Together

[](#usage-using-apns-and-gcm-together)

**Send using Google Cloud Messaging**

```
/* @var $apnsGcm \gbksoft\apnsGcm\ApnsGcm */
$apnsGcm = Yii::$app->apnsGcm;
$apnsGcm->send(\gbksoft\apnsGcm\ApnsGcm::TYPE_GCM, $push_tokens, $message,
  [
    'customerProperty' => 1
  ],
  [
    'timeToLive' => 3
  ],
)
```

**Send using Apple push notification service**

```
/* @var $apnsGcm \gbksoft\apnsGcm\ApnsGcm */
$apnsGcm = Yii::$app->apnsGcm;
$apnsGcm->send(\bryglen\apnsgcm\ApnsGcm::TYPE_APNS, $push_tokens, $message,
  [
    'customerProperty' => 1
  ],
  [
    'sound' => 'default',
  	'badge' => 1
  ],
)
```

**Add to RebbitMQ queue a push notification**

```
/* @var $apnsGcm \gbksoft\apnsGcm\ApnsGcm */
$apnsGcm = Yii::$app->apnsGcm;
$apnsGcm->addToQueue(\gbksoft\apnsGcm\ApnsGcm::TYPE_APNS, $push_tokens, $message,
  [
    'customerProperty' => 1
  ],
  [
    'sound' => 'default',
  	'badge' => 1
  ],
)
```

**You need to add console command to config like this**

```
'controllerMap' => [
    'apnsGcm' => [
        'class' => 'gbksoft\apnsGcm\console\ApnsGcmController',
    ],
],
```

This extension is fork of

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~18 days

Total

6

Last Release

3778d ago

### Community

Maintainers

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

---

Top Contributors

[![littlefuntik](https://avatars.githubusercontent.com/u/876937?v=4)](https://github.com/littlefuntik "littlefuntik (1 commits)")

---

Tags

gcmyii2apnsgbksoft

### Embed Badge

![Health badge](/badges/gbksoft-yii2-apnsgcm-through-rabbitmq/health.svg)

```
[![Health](https://phpackages.com/badges/gbksoft-yii2-apnsgcm-through-rabbitmq/health.svg)](https://phpackages.com/packages/gbksoft-yii2-apnsgcm-through-rabbitmq)
```

###  Alternatives

[norkunas/onesignal-php-api

OneSignal API for PHP

2441.8M21](/packages/norkunas-onesignal-php-api)[bryglen/yii2-apns-gcm

Yii 2 Apns and Gcm together

54277.8k1](/packages/bryglen-yii2-apns-gcm)[dotzero/yii2-amocrm

Расширение для Yii Framework 2 реализующее клиент для работы с API amoCRM

1639.7k](/packages/dotzero-yii2-amocrm)[conquer/services

Yii2 soap wsdl web services

1632.5k](/packages/conquer-services)[skeeks/yii2-google-api

Component for work with google api based on google/apiclient

1243.1k1](/packages/skeeks-yii2-google-api)[apexwire/yii2-restclient

Tools to use API as ActiveRecord for Yii2

143.5k](/packages/apexwire-yii2-restclient)

PHPackages © 2026

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