Installation
To set up the Unico SDK for Flutter, follow the steps below:
Step 1 — Add the package via Flutter CLI
Run the following command using the Flutter CLI:
flutter pub add unico_check
This command adds the following line to the pubspec.yaml of your package:
dependencies:
unico_check: ^4.56.0
flutter pub add unico_check implicitly runs flutter pub get. If the package is not installed correctly, ensure that unico_check is listed in pubspec.yaml and run flutter pub get manually.
The Flutter plugin uses CocoaPods on the iOS side. CocoaPods builds may be rejected by the App Store due to bitcode in the DeviceProfiling and UnicoSdkLogger frameworks. This issue surfaces at submission time, not at install time. See iOS Known Issues for the workaround before submitting to production.
Step 2 — Set Android minimum SDK version
The SDK requires Android 5.0 (API 21) or higher. In your android/app/build.gradle, ensure minSdkVersion is set accordingly:
android {
defaultConfig {
minSdkVersion 21
}
}
Step 3 — Add iOS camera permission
Add the camera usage description to your ios/Runner/Info.plist:
<key>NSCameraUsageDescription</key>
<string>Camera usage description</string>
If you're distributing with Xcode 16 using CocoaPods, you may encounter a bitcode-related App Store rejection. See Known Issues for the workaround.
Step 4 — Import the package
Import the package into your Dart code:
import 'package:unico_check/unico_check.dart';