Before Getting Started
Overview
This guide walks you through setting up the Clix SDK in a React Native project. It covers all required steps including installing dependencies, configuring Firebase, and initializing the SDK. By following this quickstart, you can send your first notification in just a few minutes. This guide supports both Expo and standard React Native CLI projects.Prerequisites
- Have a React Native project (Expo or React Native CLI)
- Create or use an existing Firebase project in the Firebase Console
- Note your Android package name and iOS bundle identifier
- For Expo projects: Ensure you’re using
expo-dev-clientwith local development builds (not Expo Go)
Install React Native Firebase
You can skip this step if you already integrate React Native Firebase.- Expo
- React Native CLI
Make sure your React Native Expo project is using expo-dev-client with a local development build (not the standard Expo Go app).This is required to enable platform-native features such as push notifications.If your project isn’t using expo-dev-client yet, run the following script to install it:
1. Install React Native Firebase Core Module
1. Install React Native Firebase Core Module
Add the core Firebase module:
2. Add Firebase Config Files
2. Add Firebase Config Files
From the Firebase console download:
- google-services.json (for Android)
- GoogleService-Info.plist (for iOS)
3. Prebuild Native Code
3. Prebuild Native Code
Apply native configuration:
Install Clix SDK
- Expo
- React Native CLI
1. Install Clix Dependencies
1. Install Clix Dependencies
Add the Clix SDK and required dependencies:
Version Compatibility
- React Native 0.70-0.73: Use
react-native-get-random-valuesv1.11.0 andreact-native-mmkvv2.12.2 - React Native 0.74+: Use
react-native-get-random-valuesv1.12.0+ andreact-native-mmkvv3.0.1+ react-native-nitro-modulesis required when usingreact-native-mmkvv3.0.1+
2. Initialize Clix SDK
2. Initialize Clix SDK
Add the Clix initialization code at the top of your
index.js file:3. Build and Run
3. Build and Run
Apply native code and configuration:
We recommend rebooting the simulator and reinstalling the app before running it again.