# iOS SDK Methods and Properties

## OZSDK <a href="#h.d54w6nclhn63" id="h.d54w6nclhn63"></a>

A singleton for Oz SDK.

### Methods <a href="#h.tdzh7awerneq" id="h.tdzh7awerneq"></a>

#### OZSDK  <a href="#h.xbz0s42baaxx" id="h.xbz0s42baaxx"></a>

Initializes OZSDK with the license data. The closure is either license data or [LicenseError](#h.nl72difjt7t4-1).

| **Parameter**  | **Type**                            | **Description**           |
| -------------- | ----------------------------------- | ------------------------- |
| licenseSources | \[[LicenseSource](#h.1youdsuhceqn)] | The source of the license |

**Returns**

\-

#### setLicense

Forces the license installation.

| Parameter     | Type                             | Description           |
| ------------- | -------------------------------- | --------------------- |
| licenseSource | [LicenseSource](#h.1youdsuhceqn) | Source of the license |

#### setApiConnection

Sets connection to Oz API.

| **Parameter** | **Type**                       | **Description**          |
| ------------- | ------------------------------ | ------------------------ |
| apiConnection | [Connection](#enum-connection) | Authorization parameters |

**Returns**

The access token or an error.

#### setEventsConnection

Sets connection to the telemetry server.

| **Parameter**    | **Type**                       | **Description**                    |
| ---------------- | ------------------------------ | ---------------------------------- |
| eventsConnection | [Connection](#enum-connection) | Telemetry authorization parameters |

**Returns**

The access token or an error.

#### isLoggedIn <a href="#h.4j8u261to9nm" id="h.4j8u261to9nm"></a>

Checks whether an access token exists.

**Parameters**

\-

**Returns**

The result – the true or false value.

#### logout <a href="#h.txtify9mk677" id="h.txtify9mk677"></a>

Deletes the saved access token

**Parameters**

\-

**Returns**

\-

#### createVerificationVCWithDelegate <a href="#h.uroxud58sp64" id="h.uroxud58sp64"></a>

Creates the Liveness check controller.

| **Parameter**             | **Type**                                  | **Description**                                                                         |
| ------------------------- | ----------------------------------------- | --------------------------------------------------------------------------------------- |
| delegate                  | [OZLivenessDelegate](#h.kq1590g3dd67)     | The delegate for Oz Liveness                                                            |
| actions                   | [OzVerificationMovement](#h.20yp3ix24ijd) | Captured action                                                                         |
| cameraPosition (optional) | AVCaptureDevice.Position                  | <p><code>front</code> – front camera (default),<br> <code>back</code> – rear camera</p> |

**Returns**

UIViewController or an exception.

#### createVerificationVC <a href="#h.avv4lbfn8jdn" id="h.avv4lbfn8jdn"></a>

Creates the Liveness check controller.

| **Parameter**             | **Type**                                                                                                                                                          | **Description**                                                                                                                                              |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| actions                   | [OzVerificationMovement](#h.20yp3ix24ijd)                                                                                                                         | Captured action                                                                                                                                              |
| FaceCaptureCompletion     | <p>type alias used as follows:</p><p><code>public typealias FaceCaptureCompletion = (\_ results: \[OZMedia]?, \_ error: OZVerificationStatus?) -> Void</code></p> | The handler that is executed when the method completes. The closure is either an array of [OZMedia](#h.hizmhq9c5cq9) objects or an [error](#h.lh6l9d806vzr). |
| cameraPosition (optional) | AVCaptureDevice.Position                                                                                                                                          | <p><code>front</code> – front camera (default),<br> <code>back</code> – rear camera</p>                                                                      |

**Returns**

UIViewController or an exception.

#### cleanTempDirectory <a href="#h.lxv6e0jcez8m" id="h.lxv6e0jcez8m"></a>

Deletes all videos.

**Parameters**

\-

**Returns**

\-

#### getEventSessionId

Retrieves the telemetry session ID.

**Parameters**

\-

**Returns**

The telemetry session ID (String parameter).

#### set

Sets the bundle to look for translations in.

| **Parameter**  | **Type** | **Description**                       |
| -------------- | -------- | ------------------------------------- |
| languageBundle | Bundle   | The bundle that contains translations |

**Returns**

\-

#### setSelfieLength

Sets the length of the **Selfie** gesture (in milliseconds).

| **Parameter** | **Type** | **Description**                                                                                                 |
| ------------- | -------- | --------------------------------------------------------------------------------------------------------------- |
| selfieLength  | Int      | The length of the **Selfie** gesture (in milliseconds). Should be within 500-5000 ms, the default length is 700 |

#### generateSignedPayload

Generates the payload with media signatures.

| **Parameter** | **Type**                   | **Description**            |
| ------------- | -------------------------- | -------------------------- |
| media         | [OZMedia](#h.hizmhq9c5cq9) | An array of media files    |
| folderMeta    | \[String]                  | Additional folder metadata |

**Returns**

Payload to be sent along with media files that were used for generation.

### Properties <a href="#h.zh6o2vvkcwsi" id="h.zh6o2vvkcwsi"></a>

#### localizationCode <a href="#h.52t7w0k83w8a" id="h.52t7w0k83w8a"></a>

SDK locale (if not set, works automatically).

| **Parameter**    | **Type**                              | **Description**       |
| ---------------- | ------------------------------------- | --------------------- |
| localizationCode | [OZLocalizationCode](#h.6x3wdw11shxa) | The localization code |

#### host <a href="#h.ibn5khvrgtdq" id="h.ibn5khvrgtdq"></a>

The host to call for Liveness video analysis.

| **Parameter** | **Type** | **Description** |
| ------------- | -------- | --------------- |
| host          | String   | Host address    |

#### attemptSettings <a href="#h.rgnn71rc8gab" id="h.rgnn71rc8gab"></a>

The holder for attempts counts before SDK returns error.

| **Parameter**        | **Type**                                           | **Description**                                                                |
| -------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------ |
| singleCount          | Int                                                | Attempts on a single action/gesture                                            |
| commonCount          | Int                                                | Total number of attempts on all actions/gestures if you use a sequence of them |
| faceAlignmentTimeout | Float                                              | Time needed to align face into frame                                           |
| uploadMediaSettings  | [UploadMediaSettings](#struct-uploadmediasettings) | Sets the number of attempts and timeout between them                           |

#### version <a href="#h.ojhjjmjekdv4" id="h.ojhjjmjekdv4"></a>

The SDK version.

| **Parameter** | **Type** | **Description** |
| ------------- | -------- | --------------- |
| version       | String   | Version number  |

## OZLivenessDelegate <a href="#h.kq1590g3dd67" id="h.kq1590g3dd67"></a>

A delegate for OZSDK.

### Methods <a href="#h.tndvfnha8ff9" id="h.tndvfnha8ff9"></a>

#### onOZLivenessResult <a href="#h.vjj6377632zc" id="h.vjj6377632zc"></a>

Gets the Liveness check results.

| **Parameter** | **Type**                      | **Description**                  |
| ------------- | ----------------------------- | -------------------------------- |
| results       | \[[OzMedia](#h.hizmhq9c5cq9)] | An array of the OzMedia objects. |

**Returns**

\-

#### onError <a href="#h.empe95oabonl" id="h.empe95oabonl"></a>

The error processing method.

| **Parameter** | **Type**                                | **Description**        |
| ------------- | --------------------------------------- | ---------------------- |
| status        | [OZVerificationStatus](#h.lh6l9d806vzr) | The error description. |

**Returns**

\-

## AnalysisRequest <a href="#h.z1htnl1or79" id="h.z1htnl1or79"></a>

A protocol for performing checks.

### Methods <a href="#h.pbd0dgbi3f9o" id="h.pbd0dgbi3f9o"></a>

#### AnalysisRequestBuilder <a href="#h.phxl5byegpph" id="h.phxl5byegpph"></a>

Creates the AnalysisRequest instance.

| **Parameter**       | **Type** | **Description**                                                             |
| ------------------- | -------- | --------------------------------------------------------------------------- |
| folderId (optional) | String   | The identifier to define when you need to upload media to a certain folder. |

**Returns**

The AnalysisRequest instance.

#### addAnalysis <a href="#h.u5vxmniuk79q" id="h.u5vxmniuk79q"></a>

Adds an analysis to the AnalysisRequest instance.

| **Parameter** | **Type**                    | **Description**                                              |
| ------------- | --------------------------- | ------------------------------------------------------------ |
| analysis      | [Analysis](#h.kt3ifyywae8e) | A structure containing information on the analyses required. |

**Returns**

\-

#### uploadMedia <a href="#h.u5vxmniuk79q" id="h.u5vxmniuk79q"></a>

Uploads media on server.

| **Parameter** | **Type**                   | **Description**                                     |
| ------------- | -------------------------- | --------------------------------------------------- |
| media         | [OZMedia](#h.hizmhq9c5cq9) | Media or an array of media  objects to be uploaded. |

**Returns**

\-

#### addFolderId <a href="#h.1sbjrsbfezvg" id="h.1sbjrsbfezvg"></a>

Adds the folder ID to upload media to a certain folder.

| **Parameter** | **Type** | **Description**        |
| ------------- | -------- | ---------------------- |
| folderId      | String   | The folder identifier. |

**Returns**

\-

#### addFolderMeta <a href="#h.53ou0g8vq7x4" id="h.53ou0g8vq7x4"></a>

Adds metadata to a folder.

| **Parameter** | **Type**  | **Description**                                                   |
| ------------- | --------- | ----------------------------------------------------------------- |
| meta          | \[String] | <p>An array of metadata as follows:</p><p>\["meta1": "data1"]</p> |

**Returns**

\-

#### run <a href="#h.hhljkm79q954" id="h.hhljkm79q954"></a>

Runs the analyses.

| **Parameter**     | **Type**                                                                                                                                                                            | **Description**                                              |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| statusHandler     | <p>A callback function as follows:</p><p><code>statusHandler: @escaping ((\_ status:</code> <a href="#requeststatus"><code>RequestStatus</code></a><code>) -> Void)</code></p>      | The handler that is executed when the scenario state changes |
| errorHandler      | <p>A callback function as follows:</p><p><code>errorHandler: @escaping ((\_ error: Error) -> Void)</code></p>                                                                       | Error handler                                                |
| completionHandler | <p>A callback function as follows:</p><p><code>completionHandler: @escaping (\_ results :</code> <a href="#requestresult"><code>RequestResult</code></a><code>) -> Void)</code></p> | The handler that is executed when the run method completes.  |

**Returns**

The analysis result or an error.

## Customization <a href="#h.eocz154uib0s" id="h.eocz154uib0s"></a>

Customization for OzLivenessSDK (use `OZSDK.customization`).

### toolbarCustomization <a href="#h.b7u90ed634k0" id="h.b7u90ed634k0"></a>

A set of customization parameters for the toolbar.

<table data-header-hidden><thead><tr><th width="245.33333333333331"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Parameter</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td>closeButtonIcon</td><td>UIImage</td><td>An image for the close button</td></tr><tr><td>closeButtonColor</td><td>UIColor</td><td>Close button <code>tintColor</code></td></tr><tr><td>titleFont</td><td>UIFont</td><td>Toolbar title text font</td></tr><tr><td>titleColor</td><td>UIColor</td><td>Toolbar title text color</td></tr><tr><td>backgroundColor</td><td>UIColor</td><td>Toolbar background color</td></tr><tr><td>titleText</td><td>String</td><td>Text on the toolbar</td></tr></tbody></table>

### centerHintCustomization <a href="#h.9467gf9uekkd" id="h.9467gf9uekkd"></a>

A set of customization parameters for the center hint that guides a user through the process of taking an image of themselves.

| **Parameter**          | **Type** | **Description**                                                 |
| ---------------------- | -------- | --------------------------------------------------------------- |
| textFont               | UIFont   | Center hint text font                                           |
| textColor              | UIColor  | Center hint text color                                          |
| backgroundColor        | UIColor  | Center hint text background                                     |
| verticalPosition       | Int      | Center hint vertical position from the screen top (in %, 0-100) |
| hideTextBackground     | Bool     | Hides text background                                           |
| backgroundCornerRadius | Int      | Center hint background frame corner radius                      |

### hintAnimationCustomization <a href="#h.9467gf9uekkd" id="h.9467gf9uekkd"></a>

A set of customization parameters for the hint animation.

| **Parameter**     | **Type** | **Description**                                                   |
| ----------------- | -------- | ----------------------------------------------------------------- |
| hideAnimation     | Bool     | A switcher for hint animation, if `True`, the animation is hidden |
| animationIconSize | CGfloat  | A side size of the animation icon square                          |
| hintGradientColor | UIColor  | The close-to-frame gradient color                                 |

### faceFrameCustomization <a href="#h.4xa7epa0fizn" id="h.4xa7epa0fizn"></a>

A set of customization parameters for the frame around the user face.

| **Parameter**             | **Type**                        | **Description**                                                    |
| ------------------------- | ------------------------------- | ------------------------------------------------------------------ |
| geometryType              | [GeometryType](#h.nl72difjt7t4) | The frame type: oval, rectangle, circle, or square                 |
| cornerRadius              | CGFloat                         | Rectangle corner radius (in dp)                                    |
| strokeFaceNotAlignedColor | UIColor                         | Frame color when a face is not aligned properly                    |
| strokeFaceAlignedColor    | UIColor                         | Frame color when a face is aligned properly                        |
| strokeWidth               | CGFloat                         | Frame stroke width (in dp, 0-20)                                   |
| strokePadding             | CGFloat                         | A padding from the stroke to the face alignment area (in dp, 0-10) |

### backgroundCustomization <a href="#h.1j5m1u980aq6" id="h.1j5m1u980aq6"></a>

A set of customization parameters for the background outside the frame.

| **Parameter**   | **Type** | **Description**  |
| --------------- | -------- | ---------------- |
| backgroundColor | UIColor  | Background color |

### versionCustomization <a href="#h.1ejjedxjm8az" id="h.1ejjedxjm8az"></a>

A set of customization parameters for the SDK version text.

| **Parameter** | **Type** | **Description**        |
| ------------- | -------- | ---------------------- |
| textFont      | UIFont   | SDK version text font  |
| textColor     | UIColor  | SDK version text color |

### antiscamCustomization <a href="#h.1ejjedxjm8az" id="h.1ejjedxjm8az"></a>

A set of customization parameters for the alert message that warns user about their actions being recorded. This message is placed above the oval.

<table data-header-hidden><thead><tr><th width="254.33333333333331"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Parameter</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td>customizationEnableAntiscam</td><td>Bool</td><td>Adds the antiscam message</td></tr><tr><td>customizationAntiscamTextMessage</td><td>String</td><td>Antiscam message text</td></tr><tr><td>customizationAntiscamTextFont</td><td>UIFont</td><td>Antiscam message text font</td></tr><tr><td>customizationAntiscamTextColor</td><td>UIColor</td><td>Antiscam message text color</td></tr><tr><td>customizationAntiscamBackgroundColor</td><td>UIColor</td><td>Antiscam message text background color</td></tr><tr><td>customizationAntiscamCornerRadius</td><td>CGFloat</td><td>Background frame corner radius</td></tr><tr><td>customizationAntiscamFlashColor</td><td>UIColor</td><td>Color of the flashing indicator close to the antiscam message</td></tr></tbody></table>

### logoCustomization

Logo customization parameters. Custom logo should be allowed by license. By default, logo is placed on the bottom left.

| **Parameter**      | **Type**                  | **Description**   |
| ------------------ | ------------------------- | ----------------- |
| image              | UIImage                   | Logo image        |
| size               | CGSize                    | Logo size (in dp) |
| verticalPosition   | Int (0-100), default: 100 | Vertical offset   |
| horizontalPosition | Int (0-100), default: 0   | Horizontal offset |

## Variables and Objects <a href="#h.cus902e8glm0" id="h.cus902e8glm0"></a>

### enum LicenseSource <a href="#h.1youdsuhceqn" id="h.1youdsuhceqn"></a>

A source of a license.

| **Case**        | **Description**                        |
| --------------- | -------------------------------------- |
| licenseFilePath | An absolute path to a license (String) |
| licenseFileName | The name of the license file           |

### struct LicenseData <a href="#h.vc1ob77t7yzu" id="h.vc1ob77t7yzu"></a>

The license data.

| **Parameter**      | **Type**         | **Description**          |
| ------------------ | ---------------- | ------------------------ |
| appIDS             | \[String]        | An array of bundle IDs   |
| expires            | TimeInterval     | The expiration interval  |
| features           | Features         | License features         |
| configs (optional) | ABTestingConfigs | Additional configuration |

### enum OzVerificationMovement <a href="#h.20yp3ix24ijd" id="h.20yp3ix24ijd"></a>

Contains action from the captured video.

<mark style="background-color:red;">On January 1, 2027, the One Shot gesture will become unavailable. Please plan your</mark> [<mark style="background-color:red;">migration</mark>](/oz-knowledge/guides/developer-guide/migration-guides/migration-from-one-shot-gesture.md)<mark style="background-color:red;">.</mark>

| **Case**  | **Description**                    |
| --------- | ---------------------------------- |
| smile     | Smile                              |
| eyes      | Blink                              |
| scanning  | Scan                               |
| selfie    | A selfie with face alignment check |
| one\_shot | The best shot from the video taken |
| left      | Head turned left                   |
| right     | Head turned right                  |
| down      | Head tilted downwards              |
| up        | Head lifted up                     |

### enum OZLocalizationCode <a href="#h.6x3wdw11shxa" id="h.6x3wdw11shxa"></a>

Contains the locale code according to [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).

| **Case**       | **Description**                                        |
| -------------- | ------------------------------------------------------ |
| en             | English                                                |
| hy             | Armenian                                               |
| kk             | Kazakh                                                 |
| ky             | Kyrgyz                                                 |
| tr             | Turkish                                                |
| es             | Spanish                                                |
| pt-BR          | Portuguese (Brazilian)                                 |
| custom(String) | Custom language (language ISO 639-1 code, two letters) |

### struct OZMedia <a href="#h.hizmhq9c5cq9" id="h.hizmhq9c5cq9"></a>

Contains all the information on the media captured.

| **Parameter**     | **Type**                                               | **Description**                    |
| ----------------- | ------------------------------------------------------ | ---------------------------------- |
| movement          | [OZVerificationMovement](#h.20yp3ix24ijd)              | User action type                   |
| mediaType         | [MediaType](#h.x1o4e6r9wn22)                           | Type of media                      |
| metaData          | <p>\[String] as follows:</p><p>\["meta1": "data1"]</p> | Metadata if any                    |
| videoURL          | URL                                                    | URL of the Liveness video          |
| bestShotURL       | URL                                                    | URL of the best shot in PNG        |
| preferredMediaURL | URL                                                    | URL of the API media container     |
| timestamp         | Date                                                   | Timestamp for the check completion |

### enum MediaType <a href="#h.x1o4e6r9wn22" id="h.x1o4e6r9wn22"></a>

The type of media captured.

| **Case**      | **Description**                |
| ------------- | ------------------------------ |
| movement      | A media with an action         |
| documentBack  | The back side of the document  |
| documentFront | The front side of the document |

### enum OZVerificationStatus <a href="#h.lh6l9d806vzr" id="h.lh6l9d806vzr"></a>

Error description.

| **Case**                            | **Description**                                                |
| ----------------------------------- | -------------------------------------------------------------- |
| userNotProcessed                    | The Liveness check was not processed                           |
| failedBecauseUserCancelled          | The check was interrupted by user                              |
| failedBecauseCameraPermissionDenied | The Liveness check can't be performed: no camera access        |
| failedBecauseOfBackgroundMode       | The Liveness check can't be performed: background mode         |
| failedBecauseOfTimeout              | The Liveness check can't be performed: timeout                 |
| failedBecauseOfAttemptLimit         | The Liveness check can't be performed: attempts limit exceeded |
| failedBecausePreparingTimout        | The Liveness check can't be performed: face alignment timeout  |
| failedBecauseOfLowMemory            | The Liveness check can't be performed: no memory left          |

### struct Analysis <a href="#h.kt3ifyywae8e" id="h.kt3ifyywae8e"></a>

Contains information on what media to analyze and what analyses to apply.

| **Parameter**         | **Type**                                             | **Description**                                                                                                                            |
| --------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| media                 | \[[OzMedia](#h.hizmhq9c5cq9)]                        | An array of the OzMedia objects                                                                                                            |
| type                  | [AnalysisType](#h.qww0i8kvhvdr)                      | The type of the analysis                                                                                                                   |
| mode                  | [AnalysisMode](#h.wu8r2jgbdoba)                      | The mode of the analysis                                                                                                                   |
| sizeReductionStrategy | [SizeReductionStrategy](#enum-sizereductionstrategy) | Defines what type of media is being sent to the server in case of the hybrid analysis once the on-device analysis is finished successfully |
| params (optional)     | String                                               | Additional parameters                                                                                                                      |

### enum AnalysisType <a href="#h.qww0i8kvhvdr" id="h.qww0i8kvhvdr"></a>

The type of the analysis.

| **Case**              | **Description**                                                                                                            |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| biometry              | The algorithm that allows comparing several media and check if the people on them are the same person or not               |
| quality               | The algorithm that aims to check whether a person in a video is a real human acting in good faith, not a fake of any kind. |
| document (deprecated) | The analysis that aims to recognize the document and check if its fields are correct according to its type.                |
| blacklist             | The analysis that compares a face on a captured media with faces from the pre-made media database.                         |

{% hint style="info" %}
Currently, the .document analysis can't be performed in the on-device mode.
{% endhint %}

### enum AnalysisMode <a href="#h.wu8r2jgbdoba" id="h.wu8r2jgbdoba"></a>

The mode of the analysis.

| **Case**    | **Description**                                                                                                                                                      |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| onDevice    | The on-device analysis with no server needed. We recommend using server-based analyses whenever possible, as on-device ones tend to produce less accurate results    |
| serverBased | The server-based analysis                                                                                                                                            |
| hybrid      | The hybrid analysis for Liveness: if the score received from an on-device analysis is too high, the system initiates a server-based analysis as an additional check. |

### enum ScenarioState <a href="#h.j3ofb2op1rpr" id="h.j3ofb2op1rpr"></a>

Shows the media processing status.

| **Case**           | **Description**                                                 |
| ------------------ | --------------------------------------------------------------- |
| addToFolder        | The system is creating a folder and adding files to this folder |
| addAnalyses        | The system is adding analyses                                   |
| waitAnalysisResult | The system is waiting for the result                            |

### struct AnalysisStatus <a href="#h.1xatds1ujqc" id="h.1xatds1ujqc"></a>

Shows the files' uploading status.

| **Parameter** | **Type**                   | **Description**                                 |
| ------------- | -------------------------- | ----------------------------------------------- |
| media         | [OzMedia](#h.hizmhq9c5cq9) | The object that is being uploaded at the moment |
| index         | Int                        | Number of this object in a list                 |
| from          | Int                        | Objects quantity                                |
| progress      | Progress                   | Object uploading status                         |

### RequestStatus

Shows the analysis processing status.

| **Parameter**  | **Type**                         | **Description**            |
| -------------- | -------------------------------- | -------------------------- |
| status         | [ScenarioState](#h.j3ofb2op1rpr) | Processing analysis status |
| progressStatus | [AnalysisStatus](#h.1xatds1ujqc) | Media uploading status     |

### ResultMedia

Describes the analysis result for the single media.

| **Parameter**   | **Type**                                    | **Description**                            |
| --------------- | ------------------------------------------- | ------------------------------------------ |
| resolution      | [AnalysisResolutionStatus](#h.ye4jwpwll78m) | Consolidated analysis result               |
| sourceId        | String                                      | Media identifier                           |
| isOnDevice      | Bool                                        | Analysis mode                              |
| confidenceScore | Float                                       | Resulting score                            |
| mediaType       | String                                      | Media file type: VIDEO / IMAGE / SHOT\_SET |
| media           | [OZMedia](#h.hizmhq9c5cq9)                  | Media that is being analyzed               |
| error           | AnalysisError (inherits from Error)         | Error                                      |

### RequestResult

Contains the consolidated analysis results for all media.

| **Parameter**   | **Type**                                    | **Description**              |
| --------------- | ------------------------------------------- | ---------------------------- |
| resolution      | [AnalysisResolutionStatus](#h.ye4jwpwll78m) | Consolidated analysis result |
| folderId        | String                                      | Folder identifier            |
| analysisResults | \[[AnalysisResult](#h.umcbfiz2ybss)]        | A list of analysis results   |

### class AnalysisResult <a href="#h.umcbfiz2ybss" id="h.umcbfiz2ybss"></a>

Contains the results of the checks performed.

| **Parameter**     | **Type**                                   | **Description**                                |
| ----------------- | ------------------------------------------ | ---------------------------------------------- |
| resolution        | [AnalyseResolutionStatus](#h.ye4jwpwll78m) | Analysis resolution                            |
| type              | [AnalysisType](#h.qww0i8kvhvdr)            | Analysis type                                  |
| mode              | [AnalysisMode](#h.wu8r2jgbdoba)            | Analysis mode                                  |
| analysisId        | String                                     | Analysis identifier                            |
| error             | AnalysisError (inherits from Error)        | Error                                          |
| resultMedia       | \[[ResultMedia](#resultmedia)]             | Results of the analysis for single media files |
| confidenceScore   | Float                                      | The resulting score                            |
| serverRawResponse | String                                     | Server response                                |

### enum AnalyseResolutionStatus <a href="#h.ye4jwpwll78m" id="h.ye4jwpwll78m"></a>

The general status for all analyses applied to the folder created.

| **Case**           | **Description**                                                                     |
| ------------------ | ----------------------------------------------------------------------------------- |
| INITIAL            | No analyses have been applied yet                                                   |
| PROCESSING         | The analyses are in progress                                                        |
| FAILED             | One or more analyses failed due to some error and couldn't get finished             |
| FINISHED           | The analyses are finished                                                           |
| DECLINED           | The check failed (e.g., faces don't match or some spoofing attack detected)         |
| SUCCESS            | Everything went fine, the check succeeded (e.g., faces match or liveness confirmed) |
| OPERATOR\_REQUIRED | The result should be additionally checked by a human operator                       |

### struct AnalyseResolution <a href="#h.l4zpyeqpo63l" id="h.l4zpyeqpo63l"></a>

Contains the results for single analyses.

| **Parameter**           | **Type**                                   | **Description**                   |
| ----------------------- | ------------------------------------------ | --------------------------------- |
| analyseResolutionStatus | [AnalyseResolutionStatus](#h.ye4jwpwll78m) | The analysis status               |
| type                    | [AnalysisType](#h.qww0i8kvhvdr)            | The analysis type                 |
| folderID                | String                                     | The folder identifier             |
| score                   | Float                                      | The result of the check performed |

### enum GeometryType <a href="#h.nl72difjt7t4" id="h.nl72difjt7t4"></a>

Frame shape settings.

| **Case**                         | **Description**                        |
| -------------------------------- | -------------------------------------- |
| oval                             | Oval frame                             |
| rectangle(cornerRadius: CGFloat) | Rectangular frame (with corner radius) |
| circle                           | Circular frame                         |
| square(cornerRadius: CGFloat)    | Square frame (with corner radius)      |

### enum LicenseError <a href="#h.nl72difjt7t4" id="h.nl72difjt7t4"></a>

Possible license errors.

| **Case**            | **Description**                                                          |
| ------------------- | ------------------------------------------------------------------------ |
| licenseFileNotFound | The license is not found                                                 |
| licenseParseError   | Cannot parse the license file, the license might be invalid              |
| licenseBundleError  | The `bundle_id` in the license file doesn't match with `bundle_id` used. |
| licenseExpired      | The license is expired                                                   |

### enum Connection

The authorization type.

| **Case**         | **Description**                                                                                                                                                                     |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| fromServiceToken | <p>Authorization with a token:</p><ul><li>host: String</li><li>token: String</li><li>pins (optional): a list of <a href="#sslpin">sslPin</a></li></ul>                              |
| fromCredentials  | <p>Authorization with credentials:</p><ul><li>host: String</li><li>login: String</li><li>password: String</li><li>pins (optional): a list of <a href="#sslpin">sslPin</a></li></ul> |

### struct UploadMediaSettings

Defines the settings for the repeated media upload.

| Parameter       | Type | Description                         |
| --------------- | ---- | ----------------------------------- |
| attemptsCount   | Int  | Number of attempts for media upload |
| attemptsTimeout | Int  | Timeout between attempts            |

### enum SizeReductionStrategy

Defines what type of media is being sent to the server in case of the hybrid analysis once the on-device analysis is finished successfully. By default, the system uploads the compressed video.

| uploadOriginal   | The original video                                    |
| ---------------- | ----------------------------------------------------- |
| uploadCompressed | The compressed video                                  |
| uploadBestShot   | The best shot taken from the video                    |
| uploadNothing    | Nothing is sent (note that no folder will be created) |

### sslPin

Contains information about the [whitelisted certificates](/oz-knowledge/guides/developer-guide/sdk/oz-mobile-sdk/security-recommendations.md).

|                 |                          |                                    |
| --------------- | ------------------------ | ---------------------------------- |
| **Parameter**   | **Type**                 | **Description**                    |
| publicKeyHash   | String                   | SHA256 key hash in base64          |
| expiration date | UNIX timestamp, UTC time | The date of certificate expiration |

## OzCapsula Data Container

The methods below apply to the new feature – [OzCapsula data container](/oz-knowledge/general/readme/proprietary-format-ozcapsula-data-container.md) that has been implemented in 8.22.

#### addContainer

This method replaces `addAnalysis` in the `AnalysisRequest` structure when you use the data container flow.

**Input**

|               |          |                                                                                                                                        |
| ------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **Parameter** | **Type** | **Description**                                                                                                                        |
| DataContainer | Data     | An encrypted file containing media and collateral info, the output of the [createMediaCaptureScreen](#createmediacapturescreen) method |

#### createMediaCaptureScreen

Captures media file with all information you need and packages it into a data container.

**Input**

| **Parameter**  | **Type**                                            | **Description**                                                 |
| -------------- | --------------------------------------------------- | --------------------------------------------------------------- |
| request        | [CaptureRequest](#public-data-class-capturerequest) | Detects a request for video capture                             |
| session\_token | String                                              | Stores additional information to protect against replay attacks |

**Output**

| **Parameter** | **Type** | **Description**                                        |
| ------------- | -------- | ------------------------------------------------------ |
| DataContainer | Data     | An encrypted file containing media and collateral info |

#### public data class CaptureRequest

Detects a request for video capture.

| **Parameter**                  | **Type**                                                    | **Description**                                                                                 |
| ------------------------------ | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| analysisProfileList            | List<[AnalysisProfile](#public-data-class-analysisprofile)> | A list of objects that contain information on media and analyses that should be applied to them |
| folderMeta (optional)          | Map\<String, Any>                                           | Additional folder metadata                                                                      |
| additionalMediaList (optional) | List<[MediaRequest](#public-sealed-class-mediarequest)>     | Media files that you need to upload to server, but it’s not necessary for analyses              |
| cameraPosition (optional)      | String                                                      | <p><code>front</code> (default) – front camera</p><p><code>back</code> – rear camera</p>        |

#### public data class AnalysisProfile

Contains information on media files and analyses that should be applied to them.

| **Parameter**     | **Type**                                                                                                                                        | **Description**                |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| mediaList         | List<[MediaRequest](#public-sealed-class-mediarequest)>                                                                                         | A list of media to be analyzed |
| type              | [AnalysisType](https://doc.ozforensics.com/oz-knowledge/guides/developer-guide/sdk/oz-mobile-sdk/ios/pages/BVX89LL3HSWuDVvGUadK#h.qww0i8kvhvdr) | Analysis type                  |
| params (optional) | Map\<String, Any>                                                                                                                               | Additional analysis parameters |

#### public sealed class MediaRequest

Stores information about a media file.

{% hint style="warning" %}
Please note: you should add `actionMedia` OR `userMedia`, these parameters are mutually exclusive.
{% endhint %}

| Parameter   | Type                                                                                                                                                      | Description                                                   |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| id          | String (UUID v4)                                                                                                                                          | Media ID                                                      |
| actionMedia | [OzVerificationMovemen](https://doc.ozforensics.com/oz-knowledge/guides/developer-guide/sdk/oz-mobile-sdk/ios/pages/BVX89LL3HSWuDVvGUadK#h.20yp3ix24ijd)t | An action that user should perform in a video                 |
| userMedia   | [OZMedia](https://doc.ozforensics.com/oz-knowledge/guides/developer-guide/sdk/oz-mobile-sdk/ios/pages/BVX89LL3HSWuDVvGUadK#h.hizmhq9c5cq9)                | An external media file, e.g., a reference or a document photo |


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.ozforensics.com/oz-knowledge/guides/developer-guide/sdk/oz-mobile-sdk/ios/ios-sdk-methods-and-properties.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
