IDV SDK topic
Get Started
Requirements
| Android | iOS | |
|---|---|---|
| Support | SDK 24+ | iOS 13+ |
Licensing
Obtain a license file and include it into your project:
- Make sure that Application ID of your host Android app and Bundle ID of you host iOS app are the same value (e.g.
com.innovatrics.dot.flutter.example):- Android: See
applicationIdinbuild.gradle. - iOS: See General tab in Xcode.
- Android: See
- In order to obtain the license file, please contact your Innovatrics’ representative specifying your Application/Bundle ID.
- Include the license file into your app as an asset.
Basic Setup
Setup Android platform
You need to use FlutterFragmentActivity instead of the default FlutterActivity. If you are using customized activity that extends FlutterActivity, simply change its parent class to FlutterFragmentActivity. If you do not extend FlutterActivity, you must specify FlutterFragmentActivity in your Manifest.xml.
<activity
android:name="io.flutter.embedding.android.FlutterFragmentActivity"
android:exported="true"
...>
Setup iOS platform
IDV SDK supports both Swift Package Manager and CocoaPods. Flutter chooses between them when your application builds: Swift Package Manager is the default from Flutter 3.44 onwards, and CocoaPods is used on older versions or when you turn Swift Package Manager off.
Swift Package Manager
No setup is required. The SDK is resolved from each plugin's Swift package.
If your application's Podfile also references DOT pods directly — for example a native module declaring pod 'dot-core' — keep Swift Package Manager turned off. Otherwise each dependency manager integrates the same frameworks in ignorance of the other and embeds them twice, and the build fails — typically with conflicting build outputs or a redefined module.
CocoaPods
Include Innovatrics’ CocoaPods repository source into the Podfile of your iOS runner application prior to using IDV SDK.
source 'https://github.com/innovatrics/innovatrics-podspecs'
On Flutter 3.44 and later you also need to turn Swift Package Manager off, either per application in pubspec.yaml:
flutter:
config:
enable-swift-package-manager: false
or globally with flutter config --no-enable-swift-package-manager.
In case IDV SDK will be part of another Flutter plugin, include this setup into its README.md file.
Using IDV SDK
Before using any of the components, you need to initialize IDV SDK. When a process (e.g. onboarding) has been completed, it is usually a good practice to free the resources used by it. See how to initialize and deinitialize IDV SDK.
Example app
Find the example app here.