Flutter SmartFace Plugin Installation Guide
This guide outlines the necessary steps to get the SmartFace Flutter plugin up and running on your Android and iOS devices.
Table of Contents
- Flutter SmartFace Plugin Installation Guide
- Table of Contents
- Android Setup
- iOS Setup
- Get Credentials
Android Setup
Download Native Libraries
- Download the native libraries from this Google Drive link.
Copy the .aar to example/android/libs
-
After downloading the package, move only the
.aarfile toexample/android/libs/in your Flutter project.mkdir -p path/to/flutter_project/example/android/libs cp path/to/downloaded/smartfacemobile-v8.2.0-m7_202603311819.aar path/to/flutter_project/example/android/libs/The
example/android/libsdirectory must contain exactly one.aarfile. The filename can keep its original versioned/timestamped name. Do not rename it. You do not need to extract additional files or rename the library before building.
Modify android/app/build.gradle
-
Open your
android/build.gradlefile and add the following lines inside it:project(':flutter_smartface') { ext.libsDir = rootProject.file('libs') }Make sure to sync your project after adding this line. The plugin will automatically detect and consume the only
.aarfile found inexample/android/libsduring build. If the folder is empty or contains more than one.aar, the build will fail with a clear error.
Configure ProGuard Rules
-
If you're using ProGuard for your release builds, add the following rules to your
android/app/proguard-rules.profile:-keepclassmembers class br.com.visica.sface.** { *; }This ensures that the SmartFace SDK classes are not obfuscated during the build process.
iOS Setup
Quick Start
-
Create the frameworks folder:
mkdir -p ios/SmartfaceSDK -
Copy the three required
.xcframeworkbundles toios/SmartfaceSDK/:SmartfaceMobile.xcframeworkSmartfaceMobileUIKit.xcframeworksface.xcframework
-
Open
ios/Runner.xcworkspacein Xcode -
Add the frameworks to Runner target:
- Go to Runner target → General → Frameworks, Libraries, and Embedded Content
- Click "+", add the three frameworks from
ios/SmartfaceSDK/ - Set each to "Embed & Sign"
-
Run
pod install:cd ios && pod install && cd ..
Detailed Instructions
For complete iOS setup instructions, troubleshooting, and technical details, see:
- iOS Setup Guide - Comprehensive setup documentation
- Integration Guide - Full integration steps for both platforms
Requirements
- iOS 12.0 or higher
- Xcode 12+
- CocoaPods
Get Credentials
- To complete the setup, you'll need specific credentials for the SmartFace service. Please contact the support team to obtain these credentials.
Congratulations, you've successfully set up the SmartFace Flutter plugin for Android! If you encounter any issues, please refer to the troubleshooting section or contact support.
Libraries
- flutter_smartface_base
- flutter_smartface_camera_controller
- flutter_smartface_enroller
- flutter_smartface_hosted_flow
- flutter_smartface_hosted_flow/enrollment_flow
- flutter_smartface_hosted_flow/enrollment_models
- flutter_smartface_hosted_flow/hosted_flow_base
- flutter_smartface_hosted_flow/identification_flow
- flutter_smartface_hosted_flow/identification_models
- flutter_smartface_license
- flutter_smartface_mobile
- flutter_smartface_platform_interface
- flutter_smartface_transparent_ellipse_overlay_widget