Pusher for Realtime Notifications

Pusher is a third party service being used to power the chat system and Push Notifications on iOS & Android native apps.

Chat System

In order to use the chat functionality within your development environment, you will need to sign up for a free-tier Pusher account and retrieve its keys. Then you'll need to provide those keys to the Rails application.

  1. Sign up or sign in to your Pusher account.

  2. Once signed in, fill in the prompt to create a new Pusher Channels app.

    pusher-1

  3. In your new Pusher Channels app, click the "App Keys" tab.

    pusher-2

  4. Change your keys accordingly (name of Pusher key -> name of our application key):

    1
    2
    3
    4
    app_id -> PUSHER_APP_ID
    key -> PUSHER_KEY
    secret -> PUSHER_SECRET
    cluster -> PUSHER_CLUSTER

    pusher-3

  5. Done.

Mobile Push Notifications

These steps are required only when working with the native Apps. In order to setup Push Notifications to mobile devices you need to create a Pusher Beams instance and retrieve its credentials

  1. Sign up or sign in to your Pusher account.

  2. Once signed in, go in the "BEAMS" section on the left sidebar and fill in the prompt to create a new Pusher Beams instance.

pusher-beams-1

  1. In your new Pusher Beams instance, click the "Credentials" tab.

    pusher-beams-2

  2. Change your keys accordingly (name of Pusher key -> name of our application key):

1
2
Instance ID -> PUSHER_BEAMS_ID
Instance Key -> PUSHER_BEAMS_KEY
  1. Done. You now have your server configured to use Pusher Beams.

However, in order to send Push Notifications to devices you'll need to do some platform specific configuration as well.

Firebase for Android Push Notifications

  1. Sign up or Sign in to Firebase

  2. Add a new project. Google Analytics doesn't need to be configured for this Push Notifications to work.

fcm-1

fcm-2

  1. Add Android support for your iOS app

fcm-3

fcm-4

  1. Download the google-services.json file (to be used in the Android app)

fcm-5

  1. Finish off the next steps (not required at this moment). Now head over to your Firebase project's settings page and copy the Server key from the "Cloud Messaging" tab

fcm-6

  1. Now back in your Pusher Beams page account add the Server key from the previous step under the "Settings" tab

fcm-7

  1. Done.