This document refers to deprecated parts of the platform and has been left intact to help customers with legacy integrations. In order to access the latest platform features and documentation, please go to https://docs.sentiance.com.
Follow the step below to integrate the ReactNative Bridge (SDK).
1. Installation
1.1 Dependency
npm install --save react-native-sentiance
2. iOS Setup
2.1 Pod Installation
Install the iOS SDK
cd ios
pod install
2.2 Configuration: Background Modes
Ensure you turn on Background Modes and enable Location updates
2.2 Configuration: Permissions
Ensure you include the following permission in info.plist
Depending on your app's configuration and OS version, the SDK may need to start a foreground service every now and again. You must therefore pass a notification that can be used by the service. In the next section, you'll find a handy notification creation method.
In order for the SDK to collect data the application would need to first "create a user" on the SDK. The "createUser" should ideally be called when the user registers, logs in.
4.1 createUser
Invoke the RNSentiance.createUserExperimental method at the moment you are ready to start the data collection. (e.g on user login, on user registration, at a feature, etc)