1. Including the SDK

Flutter

Install the Sentiance Core plugin, by running the following command in your terminal, inside the project directory:

flutter pub add sentiance_core

The module should now be added to your project's pubspec.yaml file.

pubspec.yaml
dependencies:
  flutter:
    sdk: flutter
  sentiance_core: ^6.9.0
  ...

Native

Before moving forward, please ensure you follow the instructions tailored to your platform.

iOS Setup

Execute the pod install command to check for any issues. If you encounter an error resembling:

-> Installing sentiance_plugin (0.0.1)
  - Running pre install hooks
[!] The 'Pods-Runner' target has transitive dependencies that include 
statically linked binaries: (/path/to/flutter-app/ios/Pods/SENTSDK/SENTSDK.xcframework)

Instruct CocoaPods to statically link these frameworks rather than dynamically by updating the Podfile with:

target 'Runner' do
  use_frameworks! :linkage => :static
  ...

Android setup

Add the Sentiance maven repository to the build.gradle file in your project's android directory:

android/build.gradle
allprojects {
    repositories {
        ...
        maven { url "https://repository.sentiance.com" }
    }
}

This will allow Gradle to find and download the necessary native Sentiance SDK libraries.

Feature Packages

Similar to the Android's Artifacts you can install the Flutter plugins based on the features you would want to use your application. Following are the packages available:

sentiance_core
sentiance_user_context
sentiance_event_timeline
sentiance_driving_insights
sentiance_crash_detection
sentiance_smart_geofences

Contact support to learn more about which features (and packages) best suit your use-case.

Last updated