OneSignal
Configure your OneSignal app and platform
Required setup for push notifications To start sending push notifications with OneSignal, you must first configure your OneSignal app with all the platforms your support—Apple (APNs), Google (FCM).
Step-by-step instructions for configuring your OneSignal app. More detailed instructions can be found in the OneSignal documentation .
Android setup
Make sure your OneSignal app is configured for the Android platform using your Firebase credentials . Set up your notification icons to match your app’s branding. If this step is skipped, a default bell icon will display for your push notifications. Build for Android At this point, you should be able to build and run your app on a physical Android device or emulator without issues.
iOS setup
Make sure your OneSignal app is configured for the iOS platform using either the p8 Token (Recommended) or p12 Certificate . Follow these steps to add push notifications to your iOS app, including support for Badges , Confirmed Delivery , and images.
1. Add Background Modes capability to app target
This enables your app to wake in the background when push notifications arrive.
- Add Background Modes capability
- Enable Remote notifications
2. Add app target to App Group
App Groups allow data sharing between your app and the Notification Service Extension. Required for Confirmed Delivery and Badges.
- If you do NOT have an App Group configured
- If you DO have an App Group
- Add App Groups capability
- In the App Groups capability click +
- Add a new container ID in format:
group.your_bundle_id.onesignal
- Keep group. and .onesignal prefix and suffix. Replace
your_bundle_idwith your app’s bundle identifier. - For example, bundle identifier
com.onesignal.MyApp, will have the container namegroup.com.onesignal.MyApp.onesignal.
3. Add NSE target to app group
Use the same App Group ID you added in step 3.
- Go to OneSignalNotificationServiceExtension > Signing & Capabilities
- Add App Groups
- Add the exact same group ID
Build for iOS
You should now be able to build and run your app on a real iOS device or iOS simulator (16.2+).
Testing the OneSignal SDK integration
This guide helps you verify that your OneSignal SDK integration is working correctly by testing push notifications, subscription registration, and in-app messaging.
Set up test subscriptions
Test subscriptions are helpful for testing a push notification before sending a message.
Send an in-app message
In-app messages let you communicate with users while they are using your app.