Adding SDK to a Client’s Mobile App

CocoaPods

To integrate OZLivenessSDK into an Xcode project via the CocoaPods dependency manager, add the following code to Podfile:

pod 'OZLivenessSDK', :git => 'https://gitlab.com/oz-forensics/oz-liveness-ios', :tag => 'VERSION'

Version is optional as, by default, the newest version is integrated. However, if necessary, you can find the older version number in Changelog.

Since 8.1.0, you can also use a simpler code:

// for the latest version
pod ‘OZLivenessSDK’
// OR, for the specific version
// pod ‘OZLivenessSDK’, ‘8.10.0’

By default, the full version is being installed. It contains both server-based and on-device analysis modes. To install the server-based version only, use the following code:

pod 'OZLivenessSDK/Core', :git => 'https://gitlab.com/oz-forensics/oz-liveness-ios.git',  :tag => 'VERSION'

For 8.1.0 and higher:

pod ‘OZLivenessSDK/Core’
// OR
// pod ‘OZLivenessSDK/Core’, ‘8.1.0’

SPM

Please note: installation via SPM is available for versions 8.7.0 and above.

Add the following package dependencies via SPM: https://gitlab.com/oz-forensics/oz-mobile-ios-sdk (if you need a guide on adding the package dependencies, please refer to the Apple documentation). OzLivenessSDK is mandatory. If you don't need the on-device analyses, skip the OzLivenessSDKOnDevice file.

Manual Installation

You can also add the necessary frameworks to your project manually.

  1. Download the SDK files from here and add them to your project.

  • OZLivenessSDK.xcframework,

  • OZLivenessSDKResources.bundle,

  • OZLivenessSDKOnDeviceResources.bundle (if you don't need the on-device analyses, skip this file).

  1. Download the TensorFlow framework 2.11 from here.

  2. Make sure that:

  • both xcframework are in Target-Build Phases -> Link Binary With Libraries and Target-General -> Frameworks, Libraries, and Embedded Context;

  • the bundle file(s) are in Target-Build Phases -> Copy Bundle Resources.

Last updated