Insights
Search…
Introduction
A standard integration
FAQ
FAQ
SDK
Getting Started
Android Quick Start
iOS Quick Start
React Native Quick Start
1. React Native Checklist
2. Installation
3. Configuration
4. Initialization
5. Usage
6. What's Next
Appendix
API Reference
Battery Optimization
How To
Troubleshooting
Changelog
Important topics
Authentication and Authorization
User linking
PlayStore Location Access Review
Privacy Report & Dashboard
Vehicle Crash Detection
Library
Events
Moments
Segments
Glossary
Backend
GraphQL
REST API Reference
Offloads
Data Reference
Data Explorer
Data Explorer
Guide
Firehose
Verifying your integration
SDK Standard License
Journeys License
Journeys Application
Journeys Privacy Policy
Technical & Organizational Measures
Powered By
GitBook
2. Installation
The latest version of the Sentiance React Native module is
4.4.8
.
Add the NPM Dependency
Run the following command in your terminal window, inside the project directory:
1
npm install --save react-native-sentiance
Copied!
The Sentiance React Native module should now be added to your
project's
package.json
file.
package.json
1
{
2
...,
3
"dependencies"
:
{
4
...,
5
"react-native-sentiance"
:
"^4.4.8"
6
}
7
}
Copied!
Update the Podfile for iOS
Add the following lines to the
Podfile
file in your project's
ios
directory:
ios/Podfile
1
pod
'RNSentiance'
,
:path
=>
'../node_modules/react-native-sentiance/ios/RNSentiance.podspec'
2
pod
'SENTSDK'
,
:podspec
=>
'../node_modules/react-native-sentiance/ios/SENTSDK.podspec'
Copied!
Then in the terminal window, run the following command inside your project's
ios
directory:
1
pod
install
--repo-update
Copied!
Include the SDK for Android
Add the following lines to the
settings.gradle
file in your project's
android
directory:
android/settings.gradle
1
include
':react-native-sentiance'
2
project
(
':react-native-sentiance'
).
projectDir
=
new
File
(
rootProject
.
projectDir
,
'../node_modules/react-native-sentiance/android'
)
Copied!
Add the Sentiance repository to the
build.gradle
file in your project's
android
directory:
android/build.gradle
1
allprojects {
2
repositories {
3
...
4
maven { url "http://repository.sentiance.com" }
5
}
6
}
Copied!
Finally, add a dependency to the React Native project to your app's
build.gradle
:
android/app/build.gradle
1
dependencies
{
2
...
3
implementation
project
(
':react-native-sentiance'
)
4
}
Copied!
Previous
1. React Native Checklist
Next
3. Configuration
Last modified
4mo ago
Copy link
Contents
Add the NPM Dependency
Update the Podfile for iOS
Include the SDK for Android