React Native SDK Installation
Managed Expo apps can't be supported due to the explicit technical restrictions imposed by Expo. For details, see Expo Documentation, the FAQ "How do I add custom native code to my Expo project?". Smartlook functionality must be implemented in the native code.
- Install the Smartlook RN bridge
npm install smartlook-react-native-wrapper --save
- Add dependency on native Smartlook SDK
Android
- Open
android/build.gradle
- Update gradle version to
classpath 'com.android.tools.build:gradle:3.1.0'
in case you are using older React native version - Add our maven repository:
allprojects {repositories {maven {url "https://sdk.smartlook.com/android/release"}}}
Also edit gradle-wrapper.properties
so you are using: gradle-4.4-all.zip
. This step is not needed in newer React native versions.
iOS
Smartlook native library is installed as a Cocoapods dependency.
There are no manual steps required, just make sure your Cocoapod dependecies are up-to-date after Smartlook RN installation dependecy.
- Import Smartlook, setup it and start recording
var Smartlook = require('smartlook-react-native-wrapper');Smartlook.setupAndStartRecording("KEY");
To setup Smartlook, the unique project API key is needed. It can be found in the mobile project settings in Smartlook Dashboard.
- Smartlook now starts recording the app. The recordings will appear in the Smartlook player shortly.
SDK will upload sessions only on WiFi. When uploading on mobile connections is requested, it must be enabled in the project settings in the dashboard. More details about the recording process can be found in the Conceptual documentation.
Supported versions
React Native version 0.60+ on iOS 10+ and Android Jelly Bean (API 18).
Further Steps
All Smartlook SDK methods are documented in the Smartlook API reference.
Some advanced use-case and troubleshooting case-studies are described in the Cookbooks section of this documentation.
Issues and bugs can be reported in the issue tracker.
Concepts undelying the Smartlook functionality are descibed in the Conceptual documentation:
- Setup & Start Recording
- How are the data recorded and uploaded to be visible in player and dashboard
- Smartlook Life Cycle in the App, Session, User
- What is recorded be Smartlook, and how
- Smartlook Life Cycle in the App, Session, User
- Handling Sensitive Data
- Screen Recording Quality
- Tracking Events and Navigation in the App
- Smartlook integration with other tools