PHPackages                             clevis/push-notifications - 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. clevis/push-notifications

ActiveSymfony-bundle[Mail &amp; Notifications](/categories/mail)

clevis/push-notifications
=========================

Push notifications/messages for mobile devices

v1.0.1(11y ago)3321[1 issues](https://github.com/Clevis/PushNotifications/issues)MITPHPPHP &gt;=5.3.0

Since Aug 18Pushed 11y ago10 watchersCompare

[ Source](https://github.com/Clevis/PushNotifications)[ Packagist](https://packagist.org/packages/clevis/push-notifications)[ Docs](https://github.com/clevis/PushNotifications)[ RSS](/packages/clevis-push-notifications/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Clevis/PushNotifications
========================

[](#clevispushnotifications)

A bundle to allow sending of push notifications to mobile devices. Currently supports Android (C2DM, GCM), Blackberry and iOS devices.

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

[](#installation)

To use this bundle in your Nette project add the following to your `composer.json`:

```
{
    "require": {
        "clevis/push-notifications": "~0.1-beta"
    }
}
```

and enable it in your config:

```
extensions:
	pushNotifications: Clevis\PushNotifications\DI\PushNotificationsExtension

pushNotifications:
    android:
        c2dm:
            username:
            password:
            source:
        gcm:
            apiKey:
    apple:
        sandbox: # boolean
        pem: # path to certificate
        passphrase:
```

NOTE: If you are using Windows, you may need to set the Android GCM `use_multi_curl` flag to false for GCM messages to be sent correctly.

Usage
-----

[](#usage)

A little example of how to push your first message to an iOS device, we'll assume that you've set up the configuration correctly:

```
use Clevis\PushNotifications\Message\iOSMessage;
use Clevis\PushNotifications\Notifications;

class Service
{

    /**
     * @var Notifications
     */
    protected $sender;

    public function __construct(Notifications $sender)
    {
        $this->sender = $sender;
    }

    public function sendPushNotificationExample()
    {
        $message = new iOSMessage();
        $message->setMessage('Oh my! A push notification!');
        $message->setDeviceIdentifier('test012fasdf482asdfd63f6d7bc6d4293aedd5fb448fe505eb4asdfef8595a7');

        $this->sender->send($message);
    }
}

```

The send method will detect the type of message so if you'll pass it an `AndroidMessage` it will automatically send it through the C2DM/GCM servers, and likewise for Mac and Blackberry.

Android messages
----------------

[](#android-messages)

Since both C2DM and GCM are still available, the `AndroidMessage` class has a small flag on it to toggle which service to send it to. Use as follows:

```
use Clevis\PushNotificationsBundle\Message\AndroidMessage;

$message = new AndroidMessage();
$message->setGCM(true);
```

to send as a GCM message rather than C2DM.

iOS Feedback service
--------------------

[](#ios-feedback-service)

The Apple Push Notification service also exposes a Feedback service where you can get information about failed push notifications - see [here](https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html#//apple_ref/doc/uid/TP40008194-CH101-SW3) for further details.

This service is available within the bundle. The following code demonstrates how you can retrieve data from the service:

```
$feedbackService = $container->get("rms_push_notifications.ios.feedback");
$uuids = $feedbackService->getDeviceUUIDs();
```

Here, `$uuids` contains an array of [Feedback](https://github.com/richsage/RMSPushNotificationsBundle/blob/master/Device/iOS/Feedback.php) objects, with timestamp, token length and the device UUID all populated.

Apple recommend you poll this service daily.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 63.9% 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 ~3 days

Total

3

Last Release

4284d ago

Major Versions

v0.1-beta → v1.02014-08-24

### Community

Maintainers

![](https://www.gravatar.com/avatar/474f4dd92229f3cfd2c618004b250e2a96ca31f4114c2a0f9c8fb66c65ed7764?d=identicon)[Mikulas](/maintainers/Mikulas)

---

Top Contributors

[![richsage](https://avatars.githubusercontent.com/u/231551?v=4)](https://github.com/richsage "richsage (94 commits)")[![Mikulas](https://avatars.githubusercontent.com/u/192200?v=4)](https://github.com/Mikulas "Mikulas (11 commits)")[![rjmunro](https://avatars.githubusercontent.com/u/108641?v=4)](https://github.com/rjmunro "rjmunro (10 commits)")[![mac-cain13](https://avatars.githubusercontent.com/u/618233?v=4)](https://github.com/mac-cain13 "mac-cain13 (6 commits)")[![ZhukV](https://avatars.githubusercontent.com/u/2256109?v=4)](https://github.com/ZhukV "ZhukV (5 commits)")[![verdet23](https://avatars.githubusercontent.com/u/692270?v=4)](https://github.com/verdet23 "verdet23 (4 commits)")[![pskt](https://avatars.githubusercontent.com/u/2283090?v=4)](https://github.com/pskt "pskt (3 commits)")[![christiaan](https://avatars.githubusercontent.com/u/118490?v=4)](https://github.com/christiaan "christiaan (3 commits)")[![DarwinOnLine](https://avatars.githubusercontent.com/u/719285?v=4)](https://github.com/DarwinOnLine "DarwinOnLine (2 commits)")[![davedevelopment](https://avatars.githubusercontent.com/u/61351?v=4)](https://github.com/davedevelopment "davedevelopment (2 commits)")[![mente](https://avatars.githubusercontent.com/u/391997?v=4)](https://github.com/mente "mente (2 commits)")[![jmig](https://avatars.githubusercontent.com/u/955238?v=4)](https://github.com/jmig "jmig (2 commits)")[![stephanecollot](https://avatars.githubusercontent.com/u/1184396?v=4)](https://github.com/stephanecollot "stephanecollot (1 commits)")[![juaruipi](https://avatars.githubusercontent.com/u/4510088?v=4)](https://github.com/juaruipi "juaruipi (1 commits)")[![mshulyak](https://avatars.githubusercontent.com/u/8477781?v=4)](https://github.com/mshulyak "mshulyak (1 commits)")

---

Tags

pushnotificationgcmextensionapnsc2dmiosblackberrywindowsphonenete

### Embed Badge

![Health badge](/badges/clevis-push-notifications/health.svg)

```
[![Health](https://phpackages.com/badges/clevis-push-notifications/health.svg)](https://phpackages.com/packages/clevis-push-notifications)
```

###  Alternatives

[mcfedr/awspushbundle

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

40378.6k1](/packages/mcfedr-awspushbundle)

PHPackages © 2026

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