To integrate OneSignal with Firebase for sending push notifications to an Ionic 4 mobile app, you will need to follow these detailed steps:
1. Create an account on OneSignal and create a new app to get your App ID and REST API Key.
2. Create a new project in Firebase and enable Cloud Messaging. This will provide you with a Server Key and Sender ID, which will be needed for OneSignal configuration.
3. In OneSignal, go to the Settings -> App Settings and configure the Firebase Cloud Messaging (FCM) settings by adding the Server Key and Sender ID from Firebase.
4. In your Ionic 4 project, install the OneSignal plugin by running the following command:
ionic cordova plugin add
onesignal-cordova-plugin
npm install @ionic-native/onesignal
onesignal-cordova-plugin
npm install @ionic-native/onesignal
Comments
Post a Comment