light-mode-image
Learn
SDKs

Getting started with the Verifier SDKs

Set up access to the MATTR Pi mDocs Verifier SDKs, configure the SDK Backend, and initialize the SDK in your mobile application.

This guide walks you through the steps required to start building with the MATTR Pi mDocs Verifier SDKs. By the end, your mobile application will be ready to verify credential presentations. For the native iOS and Android Verifier SDKs, this includes connecting your application to a backend MATTR VII tenant. The React Native Verifier SDK does not use an SDK Backend: for in-person (proximity) verification it does not require a MATTR VII tenant or platform configuration, and only needs a tenant for remote mobile (app-to-app) verification. React Native differences are called out at each step below.

Request SDK access

To access the MATTR Pi mDocs Verifier SDKs, complete the Get Started form with the following details:

  • Your organization name and contact information.
  • The platform(s) you plan to build for (iOS, Android, or React Native).
  • A brief description of your use case.

Create a MATTR VII tenant

The native iOS and Android Verifier SDKs require a MATTR VII tenant that serves as the SDK Backend, handling SDK/app instance registration and licensing as well as credential verification. For React Native, a tenant is only required for remote mobile (app-to-app) verification.

If you are building React Native for in-person verification only, you can skip this step.

  1. Log into the MATTR Portal.
  2. Select the Create/switch tenant button on the top-right side of the screen.
    The All tenants panel is displayed, listing any existing tenants.
  3. Select the Create new button.
    The New tenant form is displayed.
  4. Use the Region dropdown list to select the region your tenant will be hosted in.
  5. Use the Tenant subdomain text box to insert a subdomain for your tenant (e.g. in-person-verification).
  6. Select the Create button to create the new tenant.
  7. Copy the displayed tenant information (audience, auth_url, tenant_url, client_id and client_secret).

Create a Verifier Application

The iOS and Android Verifier SDKs connect to a backend MATTR VII tenant. On initialization, the SDK registers your app instance with the tenant and obtains a license, so the SDK Backend must be configured before you initialize the SDK. For a full explanation of the SDK Backend and the capabilities it enables, see SDK Backend.

To configure the SDK Backend, create a Verifier Application on your MATTR VII tenant for the platform you are building, either in the MATTR Portal or via the MATTR VII API.

  1. Log in to the MATTR Portal and expand the Credential verification section in the left-hand navigation panel.

  2. Select Applications, then select the Create new button.

  3. Use the Name text box to insert a meaningful and friendly name for your application.

  4. Use the Type radio button to select iOS.

  5. Use the Team ID text box to insert your Apple Developer Team ID.

  6. Use the Bundle ID text box to insert the Bundle ID of your app (must match your Xcode project configuration).

  7. Use the App Attest toggle to set whether App Attest is Active or Inactive. When active, the app instance must provide a valid App Attest attestation during registration and token renewal. When inactive, the app can register and renew tokens using an authentication assertion only. Refer to attestation vs assertion fall-back for more information.

  8. When App Attest is active, use the App Attest environment toggle to select Development or Production.

    Set these fields in accordance with how you intend to use the app.

  9. Use the Allowed presentation method radio button to select how the application verifies credentials:

    • In-person only: the application only verifies credentials in person (proximity). The remote presentation configuration is hidden.
    • Remote and in-person: the application verifies credentials both remotely and in person. Configure the OID4VP settings for the remote presentation flow by setting the OID4VP redirect URI the user is returned to after presenting a credential.
  10. Use the Max time offline field to set the maximum time the SDK can operate offline before requiring a new license token from the configured MATTR VII backend (minimum 1 day, maximum 30 days, default 7 days). Refer to token validity and offline use for more information.

  11. Select the Create button to create the application and display its detail screen.

  12. Copy and record the ID value. You must use it when initializing the SDK.

Initialize the SDK

When you initialize the SDK, you must provide a PlatformConfiguration object with your tenant host and the id of the Verifier Application you created. This allows the SDK to register the app instance with your tenant and obtain a license to operate.

Initialize the SDK with your platform configuration. The initialize method is asynchronous, so call it from an asynchronous context:

Initialization
let platformConfig = PlatformConfiguration(
    tenantHost: URL(string: "https://your-tenant.vii.mattr.global")!,
    applicationId: "1ef1f867-20b4-48ea-aec1-bea7aff4964c"
)
try await MobileCredentialVerifier.shared.initialize(
    platformConfiguration: platformConfig
)
  • tenantHost: The URL of your MATTR VII tenant. This must be the tenant where your iOS Verifier Application is configured.
  • applicationId: The id of your configured iOS Verifier Application.

Next steps

Your application is now initialized and connected to your backend MATTR VII tenant, ready to verify credentials. Explore the following resources to start building:

  • In-person verification:
    • Quickstart: Run a sample in-person verifier app end-to-end.
    • Tutorial: Detailed walkthrough of building an app that can verify credentials in-person using Bluetooth proximity presentations.
  • Remote mobile verification:
    • Quickstart: Run a sample remote mobile verifier app end-to-end.
    • Tutorial: Detailed walkthrough of building an app that can request and verify credentials from a wallet app on the same device (app-to-app).

How would you rate this page?

Last updated on

On this page