Skip to main content

ReactNative

The Gleap SDK for React Native is the easiest way to integrate Gleap into your apps. Communicate with your users directly and build better software by discovering their everyday pain points. Gleap is your all-in-one customer feedback tool for apps and websites.

For the SDK to work, you need an API key, which you can get for free at app.gleap.io.

tip

ReactNative Expo is now fully supported with the latest RN SDK. You can find a full Expo installation guide here.

Supported platforms

✅ iOS✅ Android✴️ Web (see setup)

🏗 Installation

Install the Gleap ReactNative SDK through npm .

npm install react-native-gleapsdk --save

In some cases, you might need to reinstall the native dependencies.

Install native dependencies for Android:

Open Android Studio and sync your gradle project.

Install native dependencies for iOS:

Open your /ios folder and run pod install. If you run into any error, try to update your cocoapods repository first with pod repo update.

👷‍♂️ Initialize the SDK

Open your preferred development tool and add the following to your index.js.

import Gleap from 'react-native-gleapsdk';

After importing the Gleap SDK add the following line to your index.js. Please make sure that it gets executed only once.

Gleap.initialize('Your_TOKEN');

You don't have an API key? Get one for free here.

tip

You are all set now! Run the app and report your first bug 🎉.

🚨 Troubleshooting Android

info

Google Play will soon require that apps target API level 31 or higher. This is required for new apps from August 2022, and for updates to existing apps from November 2022.

If your project depends on API level 30 please add the following to the react-native-gleadpsdk build.gradle:


dependencies {
implementation "com.facebook.react:react-native:+"
implementation group: 'io.gleap', name: 'gleap-android-sdk', version: '14.0.1'

//add this
implementation( "androidx.appcompat:appcompat:1.3.0") {
force = true
}
implementation( "com.google.android.material:material:1.4.0") {
force = true
}
}

🤝 Need help?

We are here to help, simply drop us an email at [email protected].