For the complete documentation index, see llms.txt. This page is also available as Markdown.

Checking Liveness and Face Biometry

If you use our SDK just for capturing videos, omit this step.

OzCapsula (SDK v8.22 and newer)

Send the encrypted container to your own backend as raw bytes (application/octet-stream). Your backend forwards it to Oz API and returns the analysis response.

The code below is illustrative – YourBackend.uploadOzContainer is not part of Oz SDK. You implement this method yourself in your own backend client; Oz SDK does not provide an upload helper for this integration path.

func handleContainer(_ container: DataContainer) {
    YourBackend.uploadOzContainer(
        container,
        contentType: "application/octet-stream"
    ) { result in
        DispatchQueue.main.async {
            self.handleAnalysisResult(result)
        }
    }
}

Your backend submits the container to Oz API in a single synchronous POST request as shown here.

Legacy way: the run method (direct SDK ↔ API interaction). Warning: this method is less secure than using your backend as an intermediary, as described above.

At the Capturing Videos step, you've created a data container with all the required information in it , so now just send it to analysis using the addContainer(container) and run methods.

func onResult(container: DataContainer) {
  let analysisRequest = AnalysisRequestBuilder()
  analysisRequest.addContainer(container)
  analysisRequest.run(
            statusHandler: { status in
            },
            errorHandler: { error in
            }
        ) { result in
        }
}

SDK 8.21 and older

To check liveness and face biometry, you need to upload media to our system and then analyze them.

To interpret the results of analyses, please refer to Types of Analyses.

Below, you'll see the example of performing a check and its description.

To delete media files after the checks are finished, use the cleanTempDirectory method.

Adding metadata

To add metadata to a folder, use AnalysisRequest.addFolderMeta.

Extracting the best shot

In the params field of the Analysis structure, you can pass any additional parameters (key + value), for instance, to extract the best shot on the server side.

Using media from another SDK

To use a media file that is captured with another SDK (not Oz iOS SDK), specify the path to it in the OzMedia structure (the bestShotURL property):

Adding media to a certain folder

If you want to add your media to the existing folder, use the addFolderId method:

Last updated

Was this helpful?