> For the complete documentation index, see [llms.txt](https://doc.ozforensics.com/oz-knowledge/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.ozforensics.com/oz-knowledge/guides/administrator-guide/updates/how-to-update-mobile-sdk.md).

# How to Update Mobile SDK

This guide covers the Oz Mobile SDK for Android, iOS, and Flutter.

## Before you update

1. **Check which version you are running.** Every platform exposes the SDK version at runtime:

| Platform | Call                          |
| -------- | ----------------------------- |
| 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.

2. **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.

   * Android: [Changelog](https://doc.ozforensics.com/oz-knowledge/guides/developer-guide/sdk/oz-mobile-sdk/android/changelog.md)
   * iOS: [Changelog](https://doc.ozforensics.com/oz-knowledge/guides/developer-guide/sdk/oz-mobile-sdk/ios/changelog.md)
   * Flutter: [Changelog](https://doc.ozforensics.com/oz-knowledge/guides/developer-guide/sdk/oz-mobile-sdk/flutter/changelog.md)

   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;&#x20;
   * **minimum Oz API version**: some SDK features require a minimum API version. For example, the full [OzCapsula](https://doc.ozforensics.com/oz-knowledge/guides/developer-guide/api/oz-api/ozcapsula-data-container.md) flow requires Native SDK 10.0.0 and Oz API 6.6.1. If you run Oz API on-premise, [update the API](https://doc.ozforensics.com/oz-knowledge/guides/administrator-guide/updates/how-to-update-api.md) first.

## Update

### Android

1. 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).

   ```java
   dependencies {
       implementation 'com.ozforensics.liveness:full:NEW_VERSION'   // or :sdk
   }
   ```
2. Make sure the Oz Maven repository `https://ozforensics.jfrog.io/artifactory/main` is still in your repositories.
3. Sync Gradle, rebuild, run the checks from the [After you update](#after-you-update) section.

### iOS

#### **CocoaPods**

1. In the `Podfile`, set the new version:

   ```ruby
   pod 'OZLivenessSDK/Core', 'NEW_VERSION'
   ```
2. Run `pod update OZLivenessSDK`.

#### **Swift Package Manager**

1. In Xcode, open *Package Dependencies*, select `OzLivenessSDK`, set the new version and update the package.

#### **Manual installation**

1. Replace `OZLivenessSDK.xcframework` and `OZLivenessSDKResources.bundle` with the files from the new release. Do not mix files from different versions.

Then rebuild and run the checks from the [After you update](#after-you-update) section.

### Flutter

1. In `pubspec.yaml`, set the new version:

   ```yaml
   dependencies:
     ozsdk: ^NEW_VERSION
   ```
2. Run `flutter pub upgrade ozsdk`, then `pod install` in the `ios/` folder.
3. 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](https://doc.ozforensics.com/oz-knowledge/guides/developer-guide/sdk/oz-mobile-sdk/flutter/changelog.md). For Flutter apps, update deadlines are counted from the release date of the plugin version that contains the fix.

## After you update

1. **Check the runtime version** (see [Before you update](#before-you-update)) in a build that is going to be released.
2. **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).
3. **Check the release build, not only the debug build.** Some changes affect only release builds.
4. **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](https://developer.android.com/guide/playcore/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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.ozforensics.com/oz-knowledge/guides/administrator-guide/updates/how-to-update-mobile-sdk.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
