Overview
Setting up the OneSignal SDK in your mobile apps is a crucial step towards delivering seamless push notifications. Whether you're building for Android, iOS, or other platforms, this guide will walk you through the process of configuring your OneSignal app and connecting with various services like FCM (Android), APNS (iOS), HMS (Huawei), and ADM (Amazon).
Configure Your OneSignal App
To start sending push notifications with OneSignal, you need to configure your app with all supported platforms. If you already have a OneSignal account, ask to be invited as an admin role to set up the app. Otherwise, sign up for a free account to get started.
Step-by-Step Instructions
You can manage multiple platforms under a single OneSignal app. To add platforms to an existing app, go to Settings > Push & In-App in the OneSignal dashboard. Alternatively, click New App/Website and follow the prompts to start fresh.
Create or Select Your App
- Choose a clear and recognizable name for your app and organization.
- Select the platform(s) you want to configure (iOS, Android, etc.).
- Click Next: Configure Your Platform.
Configure Platform Credentials
Follow the prompts based on your platforms:
- Android: Set up Firebase Credentials
- iOS: p8 Token (Recommended) or p12 Certificate
- Amazon: Generate API Key
- Huawei: Authorize OneSignal
Choose Target SDK
Select the SDK that matches your development platform (e.g., iOS, Android, React Native, Unity), then click Save & Continue.
Install SDK and Save Your App ID
Once your platform is configured, your OneSignal App ID will be displayed. Copy and save this ID—you'll need it when installing and initializing the SDK. If collaborating with others, use the Invite button to add developers or teammates, then click Done to complete setup. Once complete, follow the SDK installation guide for your selected platform to finish integrating OneSignal.
SDK Setup Guides
Google Android Native
Guide for integrating OneSignal into native Android apps using FCM.
iOS Native
Native iOS SDK setup using Apple's APNS service.
Huawei Android Native
SDK setup for Huawei devices using HMS push services.
Unity
Cross-platform SDK guide for Unity-based mobile apps.
React Native & Expo
Setup instructions for React Native and Expo environments.
Cordova
Legacy SDK guide for Cordova apps using older frameworks.
Ionic & Ionic Capacitor
Setup for Ionic and Capacitor hybrid mobile apps.
Flutter
SDK guide for Flutter apps using Dart.
.NET MAUI
Guide for integrating with .NET MAUI apps.
Integrations
If you're wondering whether the SDKs are required, the answer is no—but they're highly recommended. You can integrate OneSignal using only our server-side APIs, but using our SDKs simplifies and streamlines the process, especially for handling push notifications across platforms.
What you can do without the SDK:
- Create user
- Create subscription
- Update user
- Update subscription
- Create message
- OSNotification payload
However, if you plan to use In-app messages, our SDK is required. Push notifications have platform-specific requirements that our SDKs handle for you, including:
- Obtaining push tokens across Android, iOS, Huawei, and Web
- Managing subscription status and user prompts for opt-in
- Displaying and processing push notifications on the client