Best Practices for SDK Implementation
This page consolidates the most important guidelines for integrating and maintaining Unico's SDKs. Following these practices reduces integration errors, prevents security incidents, and ensures a smooth production rollout.
Getting started
Unico offers Proofs of Concept (PoCs) with functional code examples across all supported languages. They demonstrate the expected method sequences and integration patterns. Access available PoCs through the client portal support ticket system.
SDKs evolve continuously to deliver greater security and new features. Applying updates promptly — especially critical ones — is essential. See Update Policy for timelines and obligations.
Check the current version for each platform through the respective release notes:
Update strategy
Your application likely loads multiple libraries alongside the Unico SDK. Upgrading several dependencies at once makes it difficult to identify the root cause of failures. Update the SDK in isolation and validate it in a staging environment before combining it with other changes.
When opening a support ticket for update issues, include:
- SDK language and implementation type (native or hybrid)
- Framework used
- Current version and target version
- API Key
- Description of the changes and steps to reproduce
- Results, errors, logs, screenshots, or videos
JWT security
The JWT returned after a successful capture is encrypted. Do not open, parse, or serialize it. Its internal structure may change without notice. Use it exclusively when submitting images to Unico's APIs.
For image previews, use the Base64 attribute provided alongside the JWT — never decode the JWT itself.
For security reasons, the JWT must be sent to Unico's backend within 10 minutes of capture. Packages submitted after this window are invalidated.
The JWT must be submitted only once. If an error occurs during submission, a new biometric capture must be performed — do not reuse the same JWT.
Testing guidelines
Running the SDK in virtual machines or emulators triggers security error codes (73006, 73600, 73400). Always test on physical devices to avoid misidentifying errors and unnecessary rework.
The Web SDK detects open DevTools as a potential fraud signal and invalidates the submission. Close DevTools before running end-to-end capture tests.
Perform tests in Unico's staging environment
Before going to production, run thorough tests in Unico's staging environment with realistic scenarios. Use staging-specific API Keys and configurations — never use production credentials in tests.
Platform-specific guidelines
Do not attempt to bridge the native Android or iOS SDKs inside a Flutter application. Native bridges frequently produce unmapped errors. Always use Unico's dedicated Flutter plugin.
When upgrading the Web SDK, delete the old resource files from your public folder before inserting the new ones. Files with identical names will not be overwritten automatically and can cause version conflicts.
Build artifacts from previous SDK versions can cause dependency errors after an update. Before building a new version:
- Flutter: delete
pubspec.lockand runflutter pub get - iOS: run
pod cache clean --allandpod install - Android: run
./gradlew clean
Exclude Unico SDK code from your obfuscation configuration. Obfuscating the SDK commonly causes failures in release builds that do not appear in debug builds. Refer to the platform-specific documentation for the required keep rules.
UX and performance
Structure the SDK flow into two distinct stages:
- Prepare — initialize the SDK while the page is loading (before user interaction).
- Open — launch the camera only when the user explicitly triggers the action.
Preparing the SDK in advance reduces perceived latency and improves the user experience significantly.
Production rollout
Before deploying to production, verify:
- Production API Keys and environment configurations are correct
- Rollback plan is defined and tested
- Log collection protocol is in place
- Support ticket procedures are documented for handling failures
- All validations passed in the staging environment