OneSignal Set Up Overview
Push notifications are a powerful feature for engaging users and keeping them informed about updates and events within your app. By integrating OneSignal's Push SDK into your app, you gain access to a comprehensive push notification service that offers a range of features and functionalities.
Key Features
- Send push notifications to individual devices, groups of devices, or all devices at once.
- Manage notifications via OneSignal.com dashboard or programmatically through their API.
- Specify a target URL to open within your app when a notification is clicked.
- Customize notification sounds, badging, collapsing notifications, and more.
Setting up your OneSignal Account
Create an Account
To begin, create an account on OneSignal's website (OneSignal.com). This account will serve as your central hub for managing push notifications for your app.
Configure OneSignal
- Android Configuration: OneSignal sends push notifications to Android devices through Google's Firebase Cloud Messaging (FCM) service. To enable this integration, you'll need to provide OneSignal with your Google Project Number and Firebase Server API Key. Detailed instructions for generating these keys are available on OneSignal's website.
- OneSignal for Android: https://documentation.onesignal.com/docs/android-firebase-credentials (opens in a new tab)
- iOS Configuration: For iOS devices, OneSignal utilizes Apple's APNS service to deliver push notifications. You'll need to upload your Apple Push Notification certificates, which you can generate through the Apple Developer portal. OneSignal provides comprehensive guidance for this process on their website.
- OneSignal for iOS: https://documentation.onesignal.com/docs/ios-p12-generate-certificates (opens in a new tab)
Configure Your WebToNative App
Once you've obtained the necessary keys and certificates, configure your WebToNative app by providing your OneSignal App ID. You can find this ID on your OneSignal Dashboard under App Settings --> Keys & IDs.
Note: It's essential to understand that WebToNative apps use OneSignal SDKs specifically designed for iOS and Android. Attempting to utilize OneSignal's Web SDK for native push notifications will not be effective.