Skip to main content

Installation

Importing the Document SDK into your project​

The SDK package contains a folder called SDK and a subfolder called Document.xcframework, which includes all of the supported architectures as xcframeworks.

  1. Select the appropriate SDK and copy it into your project directory.
  2. Import Document.xcframework into your Xcode project.
  3. Make sure that it is listed as Embed & Sign under your target settings:

Importing additional dependencies​

The Document SDK requires an additional dependency to perform certain operations (IDSCamera.xcframework), this is responsible for camera liveness logic. This dependency is provided separately in the IDSCamera Dependencies package.

  1. Download the required IDSCamera dependency package.
  2. Drag the included .xcframework dependency into the root level of your Xcode project.
    1. Select Copy files to destination.
    2. Ensure your main project is targeted.
  3. Make sure the dependency is listed as Embed & Sign under your target settings.

Other dependencies​

The document SDK also requires the following third-party dependencies:

  • Lottie (for animations): Can be added via Swift Package Manager or Carthage as an xcframework. We recommend using version 4.6.0 as we have tested this version.

Installing Lottie via Carthage​

  1. Add the following line to your project's Cartfile:

    binary "lottie-ios.json" == 4.6.0

    lottie-ios.json is a Carthage binary project manifest — a JSON map of version to xcframework zip URL:

    {
    "4.6.0": "https://github.com/airbnb/lottie-ios/releases/download/4.6.0/Lottie.xcframework.zip"
    }

    Since it's referenced by filename rather than a URL, place a copy of this file alongside your Cartfile.

    We pin the exact zip this way because the lottie-ios GitHub releases publish both a static and a dynamic Lottie.xcframework. Pointing Carthage at binary "lottie-ios" directly leaves it to pick whichever one it finds, which is unpredictable; the manifest pins the specific build we've tested.

  2. Run carthage update --use-xcframeworks to fetch and build the dependency.

  3. Drag the built Lottie.xcframework from Carthage/Build into your Xcode project.

  4. Make sure it is listed as Embed & Sign under your target settings.

Adding the module​

Within your app add the following:

import Document

Updating​

To update, you should download the new package and reimport it into your project.

Note: There may be breaking changes or feature updates, you should still review the migration details and the integration details for the version you are updating to and may need to make code changes. This section simply talks about how to update the installed version.

Troubleshooting​

The above is all that is needed to install the SDK in most cases. The following discusses some less likely situations:

SPM (Swift Package Manager) support​

We are aiming to distribute through SPM at some point in the future, but do not have a planned date yet.