Skip to main content

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:

pubspec.yaml
dependencies:
unico_check: ^4.56.0
Manual fetch

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.

iOS — App Store distribution / Xcode 16 / bitcode

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/app/build.gradle
android {
defaultConfig {
minSdkVersion 21
}
}
Step 3 — Add iOS camera permission

Add the camera usage description to your ios/Runner/Info.plist:

ios/Runner/Info.plist
<key>NSCameraUsageDescription</key>
<string>Camera usage description</string>
Xcode 16 distribution issue

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:

main.dart
import 'package:unico_check/unico_check.dart';