How to Update Mobile SDK
This guide covers the Oz Mobile SDK for Android, iOS, and Flutter.
Before you update
Check which version you are running. Every platform exposes the SDK version at runtime:
Android
OzLivenessSDK.version
iOS
OZSDK.version
Flutter
await OZSDK.getSDKVersion()
The version is also shown on the capture screen when the version-on-screen license feature is enabled.
Read the changelog for every version between yours and the target one, not just the latest. Updates are cumulative: by moving to a new version you also take all changes released since your current one.
In the changelog, pay attention to:
versions marked Critical: they contain protection against active attacks and set the update deadline under this policy;
major versions (the first number changes, e.g. 9.x → 10.0): they may contain breaking API changes;
minimum Oz API version: some SDK features require a minimum API version. For example, the full OzCapsula flow requires Native SDK 10.0.0 and Oz API 6.6.1. If you run Oz API on-premise, update the API first.
Update
Android
In the module
build.gradle, change the version of the artifact you already use. Keep the same artifact::sdk(server-based) or:full(server-based + on-device).Make sure the Oz Maven repository
https://ozforensics.jfrog.io/artifactory/mainis still in your repositories.Sync Gradle, rebuild, run the checks from the After you update section.
iOS
CocoaPods
In the
Podfile, set the new version:Run
pod update OZLivenessSDK.
Swift Package Manager
In Xcode, open Package Dependencies, select
OzLivenessSDK, set the new version and update the package.
Manual installation
Replace
OZLivenessSDK.xcframeworkandOZLivenessSDKResources.bundlewith the files from the new release. Do not mix files from different versions.
Then rebuild and run the checks from the After you update section.
Flutter
In
pubspec.yaml, set the new version:Run
flutter pub upgrade ozsdk, thenpod installin theios/folder.Rebuild and run the checks from the "After you update" section.
The Flutter plugin wraps the native SDKs and is released separately, so its latest version may lag behind the native SDKs. Check the latest plugin version in our Flutter changelog. For Flutter apps, update deadlines are counted from the release date of the plugin version that contains the fix.
After you update
Check the runtime version (see Before you update) in a build that is going to be released.
Run your regression scenarios: license initialization, connection to Oz API, a full capture with analysis, cancelling the capture by the user, and the error path (no camera permission, no network).
Check the release build, not only the debug build. Some changes affect only release builds.
Publish the app in App Store / Google Play.
Reaching your users faster
Publishing an app update does not update the apps already installed on your users' devices. Users keep the old SDK version until they update the app, and on mobile this usually takes months. To make critical updates effective, we recommend:
using a minimum supported app version check in your backend or app, so that you can require users to update after a critical release;
on Android, using Google Play In-App Updates (immediate flow for critical updates);
tracking the SDK version that comes with each Oz API request to see how fast your users move to the new version.
Last updated
Was this helpful?
