This article explains how to configure the push notifications
One Signal is the platform used for sending push notifications to the devices with the app installed. It is free and only one account is needed to enable push notifications for all your apps. You can create an account on the OneSignal website.
Setting up an app at One Signal
Each app must have a separate entry at One Signal so its keys are unique. To add a new app to One Signal, log in with your account and click New app/Website. Enter the app name and proceed to the next step. You will need to configure two versions of the app, iOS and Android. Start by configuring the iOS version by clicking on the platform Apple iOS (APNS) and moving to the next step.
On the Apple iOS (APNS) Configuration screen you must first change the APNs Authentication Type to the format .p12 Certificate. Then click on Upload . There you can drag and drop the generated .p12 push certificate. This certificate was created previously, together with the store certificates for iOS. If the file was created with a password, this should also be entered.
Click Save & Continue and then Save again.
Once you are back on the Push Settings screen, click on the icon Google Android (FCM), and then on Continue.
Navigate to Firebase and Click on Create a project. Enter the name of your app and click on Continue.
Un-toggle "Enable Google Analytics for this project" and click on Create project. When the loading process is done, click on Continue.
In the new screen, click on the iOS icon on the main banner.
In the first field, fill in your app's bundle ID. Be sure to include the bundle ID you used to create store certificates, not test certificates. Fill in the App nickname field with the name of your app, for convenience. Click on Register app. For the remaining prompts on the screen, click on Next until you finally click on Continue to console.
Navigate to the Project settings.
Scroll down to the field "Your apps" and click on Add app
Click on the Android icon to set it up. In the new screen, again fill in your store bundle ID and the app nickname. You will also need to fill in the SHA-1. Please consult this article for instructions on how to get your SHA-1.
Click on Register app and then several times on Next until you finally click on Continue to console.
Under the Cloud Messaging tab you will find the Server Key and the Sender ID (the Sender ID is the Project Number required by One Signal). Copy the numbers by clicking on the copy icon and paste them in OneSignal and save the configurations.
Integrate OneSignal with the app
To integrate OneSignal with the app, two configurations are required, one while building the app and the other one at the configurator. At the OneSignal website you can navigate to the app and choose the tab Keys & IDs in the top-right corner.
The keys must be used as it follows:
In the configurator under App Settings > Push Notifications
-
OneSignal App ID and REST API Key
While building the app
-
OneSignal App ID and Sender ID. The Sender ID can be found in Firebase, under Project Settings > Cloud Messaging.