Add the SDK to Your App

View this page for | |

The recommended development environment is:

  • Apple Xcode® (latest available version)
  • The minimum target version supported by the SDK:
    • For iOS - 13.0
    • For macOS - 10.15 (Catalina)

The HID Approve SDK for iOS/macOS distribution is available in two multi-platform binary framework (XCFramework) bundle variants designed for specific integration environments.

  • For production environments, use the HID_Approve_SDK.xcframework bundle which supports the following architectures:

    • iOS Production (ARM64)

    • macOS (Apple Silicon ARM64, Intel x86-64)

  • Non-production environments, use the HID_Approve_SDK_NonProd.xcframework bundle which supports the following architectures:

    • iOS Integration-Testing (ARM64)

    • iOS Simulator (Apple Silicon ARM64, Intel x86-64)

    In this variant, the built-in anti-debugging and anti-swizzling defenses have been disabled to allow the use of debugging tools such as Flex and Flipper for internal integration testing.

Important: As an integrator, you are responsible for ensuring that the Non-Production version of the SDK is not deployed in production.

With the disabled defenses in the non-production variant, it could potentially allow a malevolent attacker to bypass security measures and facilitate reverse engineering of sensitive algorithms or business logic.

Use the SDK in your App

The HID Approve SDK is delivered as a XCFramework bundle (HID_Approve_SDK.xcframework). It is available in the iOS/Libraries folder of the delivery package.

In order to facilitate testing during the development process, this XCFramework bundle also provides the iOS simulator binaries.

  1. Copy the XCFramework bundle (content of the iOS/Libraries folder) to your preferred libraries location.
  2. In your Xcode target, add the XCFramework bundle to your project Frameworks, Libraries and embedded contents setting.

Add Functions to your App

Managing Persistent Data

For iOS and macOS, the HID Approve SDK stores it's persistent data in several databases.

  • If your iOS/macOS application encounters the SDK initialization fatal error, or an application full cache cleanup is required, call the HIDDeviceFactory.reset() method to delete all the SDK databases.

  • When uninstalling the application:

    • On iOS where applications are sandboxed, all the SDK databases are deleted automatically when the application is uninstalled.

    • For macOS, the SDK databases are stored in the user's library directory (for example, Users/%username%/Library/Containers/%appbundlename%).

      To locate the path, use the following APIs:

      Note: This directory will remain on the macOS workstation even after the application is uninstalled.

      As an integrator, you must make sure the SDK's persistent data is correctly removed.