relief_applications / notifications-bundle
A bundle to send notifications from server.
Installs: 94
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.0
- doctrine/orm: >=2.5
- monolog/monolog: ^1.23
Requires (Dev)
- phpunit/phpunit: ^6.2
- symfony/framework-bundle: >=4.0.3
This package is not auto-updated.
Last update: 2021-01-23 09:13:32 UTC
README
Installation
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require relief_applications/notifications-bundle
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new RA\NotificationsBundle\RANotificationsBundle(), ); // ... } // ... }
### Step 3 : Configure the Bundle
In your project, add at the end of the file app/config/config.yml
the following configuration :
ra_notifications: android: server_key: "%android_server_key%" fcm_server: "%android_fcm_server%" ios: push_passphrase: '%ios_push_passphrase%' push_certificate: 'null' apns_server: '%ios_apns_server%' device: class: YourBundle\Entity\Device contexts: ctx_1: ios: push_certificate: /var/ioskeys/crises.pem apns_topic: topic_name1 ctx_2: ios: push_certificate: /var/ioskeys/americas.pem apns_topic: topic_name2
Optional (but recommended) :
For improved error management for iOS notifications, you will need http2 support for cURL on your machine. See this tutorial.
Once you have followed this tutorial, check that cURL supports HTTP/2 by running :
$ curl --http2 -I https://nghttp2.org/
If it works, you can remove the line :
protocol: legacy
in your app/config/config.yml
file.