Skip to main content

Posts

Showing posts from January, 2023

Onesignal Push Notifications With Firebase step by step in ionic 4

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 5. In the app.module.ts file, import the OneSignal module and add it to the providers array: 6. In the app.component.ts file, import the OneSignal module, and in the constructor, initialize the OneSignal plugin with your App ID and REST API