> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.onesignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Mobile SDK setup

> Get push credentials for Android, iOS, Huawei, and Amazon, then install the OneSignal SDK to send push notifications and in-app messages from native, React Native, Expo, Flutter, Unity, .NET MAUI, Cordova, or Capacitor apps.

Set up the OneSignal SDK to send [push notifications](https://documentation.onesignal.com/docs/en/push.md) and [in-app messages](https://documentation.onesignal.com/docs/en/in-app-messages-setup.md) to your Android, iOS, Huawei, and Amazon apps. The same SDK also supports [Live Activities](https://documentation.onesignal.com/docs/en/live-activities.md) on iOS and [Live Updates](https://documentation.onesignal.com/docs/en/android-live-notifications.md) on Android. For websites, see [Web SDK setup](https://documentation.onesignal.com/docs/en/web-sdk-setup.md).

Setup has two requirements. You can complete them in either order:

1. **Get platform credentials** and save them in OneSignal: FCM for Android, APNs for iOS, HMS for Huawei, and ADM for Amazon.
2. **Integrate the SDK**: install the OneSignal SDK for your platform and initialize it with your App ID.

***

## Get platform credentials

Push requires credentials from each platform you support. You can install the SDK before you have them. The SDK still creates users and shows in-app messages, and push starts delivering once you save the credentials.

| Platform | What you need | Where it comes from |
| - | - | - |
| Android (Google Play) | FCM Service Account private key | Firebase console |
| iOS | `.p8` auth key (recommended) or a [`.p12` certificate](./ios-p12-generate-certificates) if you already have one | Paid Apple Developer account with Admin access |
| Huawei (AppGallery) | Client ID and Client Secret | AppGallery Connect |
| Amazon (Appstore) | Client ID, Client Secret, and an API key | Amazon Developer Console security profile |

> [card] [Android (Google Play)](https://documentation.onesignal.com/docs/en/android-firebase-credentials.md)
>
> Use for Android apps on Google Play or any Android build that uses Google Play services. Create an FCM Service Account key in Firebase.

> [card] [iOS](https://documentation.onesignal.com/docs/en/ios-p8-token-based-connection-to-apns.md)
>
> Use for every iOS build, including App Store, TestFlight, and development. Create a .p8 key, which does not expire.

> [card] [Huawei (AppGallery)](https://documentation.onesignal.com/docs/en/authorize-onesignal-to-send-huawei-push.md)
>
> Use for apps on Huawei AppGallery or Huawei devices without Google Play services. Copy your Client ID and Secret from AppGallery Connect.

> [card] [Amazon (Appstore)](https://documentation.onesignal.com/docs/en/generate-an-amazon-api-key.md)
>
> Use for Fire OS apps on the Amazon Appstore. Create OAuth credentials and an API key in the Amazon Developer Console.

> [!WARNING]
>
> Push notifications do not deliver to a platform until its credentials are saved in **Settings > Push & In-App**. Each store uses its own credentials, so set up every platform you distribute on.

***

## Integrate the SDK

### Which SDK should I use?

Match the SDK to the language or framework your app is built with, and to the store you distribute through.

| Your app | Use |
| - | - |
| Kotlin or Java, distributed on Google Play | [Android native](https://documentation.onesignal.com/docs/en/android-sdk-setup.md) |
| Swift or Objective-C | [iOS native](https://documentation.onesignal.com/docs/en/ios-sdk-setup.md) |
| Distributed on the Amazon Appstore (Fire OS) | [Amazon Fire OS](https://documentation.onesignal.com/docs/en/amazon-sdk-setup.md) |
| Distributed on Huawei AppGallery, or running on Huawei devices without Google Play services | [Huawei](https://documentation.onesignal.com/docs/en/huawei-sdk-setup.md). For frameworks, see [Flutter](./huawei-flutter-sdk-setup), [React Native](./huawei-react-native-sdk-setup), [Unity](./huawei-unity-sdk-setup), or [Cordova and Capacitor](./huawei-cordova-sdk-setup) |
| React Native with its own `ios/` and `android/` projects | [React Native](https://documentation.onesignal.com/docs/en/react-native-sdk-setup.md) |
| Expo, built with EAS Build | [Expo](https://documentation.onesignal.com/docs/en/react-native-expo-sdk-setup.md) |
| Flutter | [Flutter](https://documentation.onesignal.com/docs/en/flutter-sdk-setup.md). Built in FlutterFlow? Use [FlutterFlow](https://documentation.onesignal.com/docs/en/flutterflow-sdk-setup.md) |
| Unity | [Unity](https://documentation.onesignal.com/docs/en/unity-sdk-setup.md) |
| .NET MAUI | [.NET MAUI](https://documentation.onesignal.com/docs/en/net-sdk-setup.md) |
| Cordova, or Ionic with Cordova | [Cordova](https://documentation.onesignal.com/docs/en/cordova-sdk-setup.md) |
| Capacitor, or Ionic with Capacitor | [Capacitor](https://documentation.onesignal.com/docs/en/capacitor-sdk-setup.md) |
| A website wrapped by Median.co | [Median.co](./median-integration) |

### SDK setup guides

> [card] [Android native](https://documentation.onesignal.com/docs/en/android-sdk-setup.md)
>
> Native Android apps using FCM.

> [card] [iOS native](https://documentation.onesignal.com/docs/en/ios-sdk-setup.md)
>
> Native iOS apps using APNs.

> [card] [Amazon Fire OS](https://documentation.onesignal.com/docs/en/amazon-sdk-setup.md)
>
> Apps distributed on the Amazon Appstore using ADM.

> [card] [Huawei](https://documentation.onesignal.com/docs/en/huawei-sdk-setup.md)
>
> Apps distributed on Huawei AppGallery using HMS.

> [card] [React Native](https://documentation.onesignal.com/docs/en/react-native-sdk-setup.md)
>
> Bare React Native apps.

> [card] [Expo](https://documentation.onesignal.com/docs/en/react-native-expo-sdk-setup.md)
>
> Managed Expo apps with EAS Build.

> [card] [Flutter](https://documentation.onesignal.com/docs/en/flutter-sdk-setup.md)
>
> Flutter apps using Dart.

> [card] [Unity](https://documentation.onesignal.com/docs/en/unity-sdk-setup.md)
>
> Unity apps for iOS, Android, Amazon, and Huawei.

> [card] [.NET MAUI](https://documentation.onesignal.com/docs/en/net-sdk-setup.md)
>
> .NET MAUI apps for iOS and Android.

> [card] [Cordova](https://documentation.onesignal.com/docs/en/cordova-sdk-setup.md)
>
> Cordova and Ionic Cordova hybrid apps.

> [card] [Capacitor](https://documentation.onesignal.com/docs/en/capacitor-sdk-setup.md)
>
> Capacitor and Ionic Capacitor hybrid apps.

### Other integrations

> [card] [FlutterFlow](https://documentation.onesignal.com/docs/en/flutterflow-sdk-setup.md)
>
> Low-code FlutterFlow apps.

> [card] [Median.co](./median-integration)
>
> Median.co (formerly GoNative.io) web-to-app apps.

### SDK versions

SDK Releases

***

## Next steps

> [card] [Prompt for push permissions](https://documentation.onesignal.com/docs/en/prompt-for-push-permissions.md)
>
> Ask for push permission at the right moment with an in-app message.

> [card] [Test Users](https://documentation.onesignal.com/docs/en/test-users.md)
>
> Verify delivery, rendering, and deep links before sending to your full audience.

> [card] [Mobile SDK reference](https://documentation.onesignal.com/docs/en/mobile-sdk-reference.md)
>
> Methods, classes, and event hooks for iOS, Android, and cross-platform SDKs.

> [card] [Mobile troubleshooting](https://documentation.onesignal.com/docs/en/mobile-troubleshooting.md)
>
> Resolve common push delivery, APNs, and in-app messaging issues.

***

## FAQ

### Can I install the SDK before I have push credentials?

Yes. The SDK initializes, creates users, and shows in-app messages without credentials. Push notifications start delivering after you save that platform's credentials in **Settings > Push & In-App**. See [Get platform credentials](#get-platform-credentials).

### Where do I find my App ID and API key?

Go to **Settings > Keys & IDs** in the OneSignal dashboard. The App ID is a 36-character UUID that you pass when you initialize the SDK. It is public and safe to put in your app.

The SDK does not use an API key. An App API key authenticates REST API requests from your server, such as sending messages. It is a secret, so never put it in your mobile app. See [Keys & IDs](https://documentation.onesignal.com/docs/en/keys-and-ids.md).

### Do I need separate OneSignal apps for iOS, Android, Web, and email?

No. A single OneSignal App supports multiple platforms and channels, and they all share the same users and segments. Save push credentials for each mobile platform in **Settings > Push & In-App**. Email and SMS have their own setup under **Settings**.

Use separate OneSignal Apps for separate environments, such as development, staging, and production. Each app has its own App ID, users, and messages, so test sends and test data never reach your production users. See [Apps and organizations](https://documentation.onesignal.com/docs/en/apps-organizations.md).

### Can Huawei devices or devices in China receive push notifications?

Huawei devices can, through Huawei Mobile Services (HMS). Huawei devices without Google Play services, including newer Huawei phones, can only receive push through HMS. Add the [Huawei SDK](https://documentation.onesignal.com/docs/en/huawei-sdk-setup.md) to that build. Other Android devices without Google Play services, including many sold in mainland China, cannot receive push through FCM. When a build includes both FCM and HMS and the device supports both, OneSignal uses FCM unless you [prefer HMS](https://documentation.onesignal.com/docs/en/huawei-sdk-setup.md#prefer-hms-over-fcm-optional).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.