Integration topic
Integration
This page summarizes what the consuming Flutter application must provide before calling the SmartFace APIs.
PT-BR
Esta página resume o que a aplicação Flutter consumidora precisa disponibilizar antes de chamar as APIs do SmartFace.
Language guide
English is the primary language of this page.
PT-BR: os blocos marcados com este rótulo destacam a mesma orientação em português do Brasil.
Platform Prerequisites
Android
- Provide the SmartFace
.aardistributed for your client installation. - Make the binary available from the consumer application's
android/libsdirectory. - Ensure the Gradle configuration exposes that path to the plugin.
- Declare camera and network permissions in the Android app.
iOS
- Provide
SmartfaceMobile.xcframework,SmartfaceMobileUIKit.xcframework, andsface.xcframework. - Place the frameworks in the expected SmartFace SDK directory of the consumer app.
- Add them to the application target with
Embed & Sign. - Declare
NSCameraUsageDescriptionin the host application.
Public Libraries And Their Roles
- flutter_smartface_license: license login, product discovery, install state.
- flutter_smartface_mobile: main Flutter-facing biometric API, widgets, data sync, and credential setup.
- flutter_smartface_hosted_flow: native hosted identification and enrollment flows.
- flutter_smartface_enroller: descriptor-oriented enrollment without immediate server push.
- flutter_smartface_base: shared method-channel and
PlatformViewinfrastructure.
Minimal App Startup Sequence
- Finish native binary setup.
- Authenticate the license user with FlutterSmartfaceLicensePlatform.setLogin.
- Install the correct product with FlutterSmartfaceLicensePlatform.install.
- Configure biometric API credentials with FlutterSmartfaceMobilePlatform.setCredentials.
- Optionally restore the session on app startup with FlutterSmartfaceMobilePlatform.apiConfigured.
Integrator Notes
apiConfigured()is the preferred startup check because it restores saved credentials and reapplies persisted group keys.fetchAllFromServer()also reapplies persistedgroupKeyAandgroupKeyBbefore delegating to the native layer, which helps after app restarts when the AAR no longer has the in-memory filter state.fetchFromServer()follows the same group rehydration path before the native sync call.- Do not rely on
addGroupKeyA(0)oraddGroupKeyB(0)to clear scope; useclearGroupKeyA()andclearGroupKeyB()instead. - Hosted flows are simpler to integrate, while widget APIs are better when the Flutter app must own the surrounding layout.
- The example app in this repository is the best validated end-to-end reference for production wiring.
PT-BR
Para integradores: prefira
apiConfigured()na subida do app, use hosted flow quando quiser menos composição manual e use o app de exemplo como referência de integração validada.
Libraries
- flutter_smartface_base Overview Integration UI and Camera
- Core building blocks shared by the public SmartFace Flutter APIs.
- flutter_smartface_mobile Overview Integration License and Setup Biometric Flows UI and Camera
- Main SmartFace Flutter API for biometric operations.