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. This includes connecting your application to a backend MATTR VII tenant, which every Verifier SDK requires. React Native bridges both iOS and Android, so it needs a Verifier Application per platform you ship. 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.
Install the SDK
Add the SDK to your project and complete the platform specific setup. Check the Versions table for the current release of your platform, and System requirements for the toolchain each one needs.
Access to the iOS SDK is over git with SSH authentication, using an SSH key that belongs to a GitHub user with access to the distribution repository. If that setup gives you trouble, contact MATTR support.
Swift Package Manager
- In your project's Package Dependencies, select the
+icon to add a new package. - Paste
git@github.com:mattrsdk/ios-mobile-credential-verifier-sdk.gitinto the search field. - Choose
ios-mobile-credential-verifierfrom the search results. - Select Add Package.
CocoaPods
Add the source to the top of your Podfile, then add the pod to your target:
source 'git@github.com:mattrsdk/ios-mobile-credential-verifier-sdk.git'
pod 'MobileCredentialVerifierSDK', '~> 6.0.1'Then import the SDK where you use it:
import MobileCredentialVerifierSDKInfo.plist
Proximity presentation uses Bluetooth, so your app must declare
NSBluetoothAlwaysUsageDescription. The SDK requests the permission itself, which may show the
operating system's permission prompt. createProximityPresentationSession returns
bluetoothPermissionDenied or bluetoothPermissionRestricted if the holder declines or cannot
grant it.
To keep a Bluetooth session alive while your app is in the background, also add both of these to
the UIBackgroundModes array:
bluetooth-centralbluetooth-peripheral
Entitlements
Add the App Attest entitlement,
com.apple.developer.devicecheck.appattest-environment, if your Verifier Application has App Attest
enabled. See SDK Backend.
Create a MATTR VII tenant
Every Verifier SDK requires a MATTR VII tenant that serves as the SDK Backend, handling SDK and app instance registration and licensing as well as credential verification. This applies to in-person (proximity) verification as well as remote mobile (app-to-app) verification.
- Log into the MATTR Portal.
- Select the Create/switch tenant button on the top-right side of the screen.
The All tenants panel is displayed, listing any existing tenants. - Select the Create new button.
The New tenant form is displayed. - Use the Region dropdown list to select the region your tenant will be hosted in.
- Use the Tenant subdomain text box to insert a subdomain for your tenant (e.g.
in-person-verification). - Select the Create button to create the new tenant.
- Copy the displayed tenant information (
audience,auth_url,tenant_url,client_idandclient_secret).
Create a Verifier Application
The 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.
Create iOS Verifier Applications on the API tab.
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:
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: Theidof 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).
- Handle SDK errors: Which failures the SDK expects you to handle, which mean something has gone wrong, and why a session error arrives on a listener.
How would you rate this page?
Last updated on