You can configure your app to use Apple Push Notification Service (APNS) or Firebase Cloud Messaging (FCM).
To configure your Android app to use FCM in this scenario:
Go to https://firebase.google.com/ and log in with your Google Dev credentials.
Click Get Started and select Add Project.
Enter a project name and if opting in to Google Analytics for Firebase data, click the checkbox accepting the controller-controller terms.
Click Create project and wait for the project to be created.
Click on the created project and the Project Overview page for the created project should be shown. Click the button with the Android icon to add an Android app to the project.
Enter the app package name, app nickname, and signing certificate if needed.
Follow the additional steps suggested by the setup wizard. After verifying the Firebase setup by testing communication with the Firebase servers, return to the Project Overview page.
Click the gear icon to the right of the Project Overview button and click Project Settings.
Click the Cloud Messaging tab.
Copy the Legacy server key and Sender ID for later use.
For example:
- Legacy server key = AIzaSyC6FNgsCOpBL5eXhDvwf8979mWba6x7Roo
- Sender ID = 835015092250
To configure your Android app to use FCM in this scenario:
Go to https://firebase.google.com/ and log in with your Google Dev credentials.
Click Get Started. This will open the project index page. Find the Firebase enabled project which is linked to your Android app and click the project card.
The Project Overview for the project should then be loaded. Click the gear icon to the right of the Project Overview button and click Project Settings.
Click the Cloud Messaging tab.
Copy the Legacy server key and Sender ID for later use.
For example:
- Legacy server key = AIzaSyC6FNgsCOpBL5eXhDvwf8979mWba6x7Roo
- Sender ID = 835015092250
To configure your iOS app to use APNS:
Go to https://developer.apple.com/account and log in to your Apple Developer account.
Under iOS Apps, select Identifiers.
If you have an App ID set up for push, go to Step 11.
Press the + button to create a new App ID.
Type an App ID Description.
Type an App ID Suffix.
To support push, you must use an Explicit App ID that does not use a wild card (for example, - com.tester.pushSample
).
Under App Services, select the Push Notifications check box.
Click Continue.
Click Submit.
Click Done.
Select your App ID that is set up to use push messaging from the list and click Edit.
If you already have a Push Certificate created, skip to Step 15.
Scroll down to Push Notifications and click the correct Create Certificate… button.
The button you click depends whether you are creating a certificate for Development or Production.
Follow the steps on how to create your CSR on Apple’s website, upload the CSR, and generate your certificate.
Scroll down to the Push Notifications section and download the SSL certificate you just created.
Double-click the downloaded certificate to add it to your keychain.
To get your SSL certificate and private key (APNS):
Open Keychain Access.
Click My Certificates and find the appropriate iOS Push Services Certificate for your app and environment.
You can identify the correct certificate by matching the bundle ID and whether it is Development or Production.
Expand the certificate and verify that it contains a private key.
Right-click the private key and select ** Export " <name of key>
**.
Type the necessary information in the dialog box and save your new .p12
file.
You do not have to type a password.
In the Private Key, type the .p12
file.