Holder SDK quickstart guide
This quickstart is for evaluating the MATTR Pi mDocs Holder SDKs. In about 20-25 minutes you will configure a sample holder mobile app (iOS, Android, or React Native), run it on a physical device and use it to:
- Claim a credential issued through an OID4VCI workflow.
- Present that credential remotely to a web verifier application.
- Present that credential in-person to a verifier application on a different mobile device.
Estimated time: 20-25 minutes.
Use this guide as a fast evaluation path to see the Holder SDK working end-to-end on a real device. For detailed information and API examples, explore the individual tutorials and reference documentation for credential claiming, remote presentation, and proximity presentation.
Prerequisites
- Access to the MATTR Pi mDocs Holder SDK for your chosen platform (iOS, Android, or React Native). Apply for access here.
- Access to the MATTR Portal. You will use it to create the MATTR VII tenant that the iOS and Android Holder SDKs connect to as their SDK Backend.
- A physical mobile device to run the holder application:
- iOS/Android mobile device set up with biometric authentication and Bluetooth access.
- Development environment set up for your chosen platform (e.g., Xcode for iOS, Android Studio for Android, or a React Native development environment).
- Install the MATTR GO Verify example app on a separate mobile device for iOS or Android. This is used for in-person verification testing.
Evaluation Steps
In this quickstart you will:
- Create a MATTR VII tenant.
- Configure and run a local sample holder project for your platform, connected to your MATTR VII tenant.
- Claim a credential into the sample holder app.
- Present that credential remotely to a web verifier.
- Present that credential in-person to a verifier app on a different device.
Part 1: Create a MATTR VII tenant (1-3 minutes)
The iOS and Android Holder SDKs require a MATTR VII tenant. If you already have a tenant, or you are using the React Native Holder SDK, you can skip this part.
- Log in to 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.
holder-quickstart). - Select the Create button to create the new tenant.
- Copy and record the displayed
tenant_urlvalue. You will use it to configure the sample app in the next part.
Part 2: Configure the sample holder project (5-10 minutes)
-
Access the sample holder codebase by either:
-
Cloning the MATTR Sample Apps repository:
Clone sample apps git clone https://github.com/mattrglobal/sample-apps.git -
Or downloading just the iOS sample holder project using download-directory.github.io.
-
-
Use Xcode to open the
.xcodeprojfile in the project's folder. You can find it in thesample-apps/ios-holder-tutorial-sample-appdirectory. -
Drag the
MobileCredentialHolderSDK-*version*.xcframeworkfolder (obtained from MATTR as part of the SDK package) into your project. -
Configure
MobileCredentialHolderSDK-*version*.xcframeworkto Embed & sign. -
Set a unique bundle identifier for the project in the Xcode project settings (e.g.,
com.yourname.holdersample), and select your development team. -
Create a Holder Application on your MATTR VII tenant. The iOS Holder SDK requires an SDK Backend, and the Holder Application identifies your app to the tenant:
- Log in to the MATTR Portal and expand the Credential holding section in the left-hand navigation panel.
- Select Applications, then select the Create new button.
- Use the Name text box to insert a meaningful and friendly name for your application.
- Use the Client ID text box to insert an identifier for your app, for example
holder-quickstart. - Use the Type radio button to select iOS.
- Use the Team ID text box to insert your Apple Developer Team ID, found in the "Membership details" of your Apple Developer account.
- Use the Bundle ID text box to insert the bundle identifier you set in the Xcode project settings in step 5.
- Leave Max time offline at its default value.
- Select the App Attest checkbox, then set App Attest to Inactive and App Attest environment to Development. This combination accepts a build you run from Xcode on a physical device.
- Select the Create button to create the application and display its detail screen.
- Copy and record the
IDvalue.
-
Open the
Constants.swiftfile and update it with your tenant and application details:Constants.swift static let tenantHost = URL(string: "https://your-tenant.vii.mattr.global")! static let applicationId = "<YOUR_HOLDER_APPLICATION_ID>"tenantHost: Replace with thetenant_urlyou recorded in Part 1.applicationId: Replace with theIDyou recorded in the previous step.
-
Run the project on a physical iOS device (simulators do not support the required Bluetooth capabilities).
Part 3: Claim a credential (3 minutes)
Use the sample holder app you just built to claim a credential from a MATTR VII tenant. This credential will be used in the subsequent presentation steps.
- Open the MATTR Labs Issue Credentials tool.
- Select the Generate Credential Offer button.
A QR code will be generated and rendered on the screen, along with a transaction code. - Run your application.
- Select the Claim Credential button.
- Scan the QR code.
- Follow any on-screen instructions to claim the credential.
Under the hood, the sample app uses the Holder SDK to discover the credential offer from the QR code, and then claim and store the credential on the device using the OID4VCI Pre-authorized Code flow.
Part 4: Present the credential remotely (5 minutes)
Present the credential you just claimed to a web verifier application using the remote presentation workflow defined by ISO/IEC 18013-7:2025 and OID4VP.
On iOS, if another wallet app on your testing device is also registered for the mdoc-openid4vp
scheme, iOS does not let you choose which app responds to the request, and might open the other
app instead. Remove any other wallet apps registered for this scheme from your testing device
before you test. Refer to
Wrong app opens when multiple wallet apps are installed
for more information.
- Use a mobile browser on the device where the sample application is installed to navigate to the MATTR Labs Verify Credentials tool.
- Select the OID4VP (Redirect) option from the Select Experience list.
- Select Request credentials.
- Select Allow to open the sample application.
- Select the credential you claimed in the previous part.
- Select Send Response.
- You should be redirected back to the MATTR Labs Verify Credentials tool, where you will see a successful verification indication.
In these flows, the sample app uses the Holder SDK to respond to the OID4VP authorization request, as defined in the OID4VP specification and ISO/IEC 18013-7:2025.
Part 5: Present the credential in-person (3 minutes)
Present the credential you claimed to a verifier application on a different mobile device using the proximity presentation workflow as defined by ISO/IEC 18013-5:2021.
Once you have the sample holder app running on one device, and the MATTR GO Verify app installed on a separate device, follow these steps to test in-person presentation:
- On the sample holder app, select Present Credentials.
- The app will display a QR code containing the device engagement string.
- On the verifier device, launch the MATTR GO Verify app, select Verify and scan the QR code from the holder app.
- On the sample holder app, review the verifier's request and consent to share the credential.
- The verifier application will display the verification results.
Behind the scenes, the Holder SDK handled device engagement, established a secure BLE session, and presented the mDoc to the verifier as per ISO/IEC 18013-5:2021.
Review the codebase
The sample holder application uses the Holder SDK to claim and present mDocs. Once you have the sample application running, use this section to understand the key SDK calls you will reuse in your own application.
Initialize the SDK
try await mobileCredentialHolder.initialize(
platformConfiguration: PlatformConfiguration(
tenantHost: Constants.tenantHost,
applicationId: Constants.applicationId
),
userAuthenticationConfiguration: UserAuthenticationConfiguration(
userAuthenticationBehavior: .always,
userAuthenticationType: .biometricOrPasscode,
presentationTimeoutSeconds: 20
),
credentialIssuanceConfiguration: CredentialIssuanceConfiguration(
redirectUri: "<WalletRedirectUri>",
autoTrustMobileCredentialIaca: true
),
dcConfiguration: DCConfiguration( // construct inside if #available(iOS 26.0, *)
appGroup: "group.com.yourcompany.app",
supportedDocTypes: [.mDL, .eudi]
)
)platformConfiguration: Required. Connects the SDK to your SDK Backend, using the URL of your MATTR VII tenant and theIDof your Holder Application. On first initialization the SDK registers the app instance with your tenant and obtains a license.initializethrowsfailedToRegisterif registration fails, orinvalidLicenseif the license failed to validate or has expired.userAuthenticationConfiguration: Optional. Configures when the SDK requires user authentication to access or present credentials. The example shows the default values. Refer to the reference documentation for additional details about the available configuration options.redirectUri: Provide a URL that corresponds to a specific path in your application. The SDK will redirect the user to this path after they successfully complete authentication. Required for theAuthorization Code flow.autoTrustMobileCredentialIaca: Set totrueif you trust the credential issuer(s) for any offer. Defaults tofalse.dcConfiguration: Optional. Configures Digital Credentials API support for presenting credentials via an OS-native overlay. Specify your app group and supported document types (e.g.,.mDL,.eudi,.euav,.photoid,.jpMnc). Construct it inside anif #available(iOS 26.0, *)check, as shown in the iOS DC API guide.
Credential claiming workflow
Discover credential offer
let discoveredOffer = try await mobileCredentialHolder.discoverCredentialOffer(offerUrl: String)offerUrl: Pass the OID4VCI initiation URL.
The
discoverCredentialOffer
method returns a
DiscoveredCredentialOffer
object containing the offer details.
Claim and store credentials
let retrievedCredentialResults = try await mobileCredentialHolder.retrieveCredentials(
credentialOffer: String,
clientId: "<WalletClientID>",
transactionCode: nil
)credentialOffer: Pass the OID4VCI credential offer URI.clientId: Pass a string that identifies your wallet application with the issuer.transactionCode: Provide a transaction code if thePre-Authorization Code flowoffer requires a transaction code.
The
retrieveCredentials
method returns an array of
RetrieveCredentialResult
objects, each containing the metadata of the retrieved credentials, including the credential ID
(credentialId).
Access claimed credentials
let credential = try mobileCredentialHolder.getCredential(credentialId: String)credentialId: Pass the credential ID of the credential you want to access.
Remote presentation handling
Register the verifier's Authorization URL
Ensure that your application is registered to
handle the verifier's authorization URL.
This is typically done in the app's Info.plist file. The URL scheme should match the one used by
the verifier.
Create an online presentation session
let onlinePresentationSession = try await mobileCredentialHolder.createOnlinePresentationSession(authorizationRequestUri: authorizationRequestURI, requireTrustedVerifier: false)authorizationRequestURI: Pass the OID4VP authorization request URI as a string.requireTrustedVerifier: Set totrueif you want to ensure that the verifier exists on the app's trusted verifier's list.
The
createOnlinePresentationSession
method returns an instance of
OnlinePresentationSession
containing requested and matching credentials.
Present matching credentials to holder
let credential = try await mobileCredentialHolder.getCredential(credentialId: id)id: Pass the identifier of the credential you want to present, as a string. This information can be retrieved from theOnlinePresentationSessionobject returned by thecreateOnlinePresentationSessionmethod.
Your application must then gather the user's consent to share the matching credential with the verifier.
Send a response to the verifier
try await onlinePresentationSession.sendResponse(credentialIds: [id])id: Pass the identifier of the credential you want to send, as a string.
Proximity presentation handling
Create a proximity presentation session
let proximityPresentationSession = try await mobileCredentialHolder.createProximityPresentationSession(
onRequestReceived: onRequestReceived(_:error:)
// 1. Callback triggered when the verifier requests a credential for verification. Use this callback to display the request on the UI and get the user's consent to share any matched credentials.
)The
createProximityPresentationSession
method returns an instance of
ProximityPresentationSession
which contains a deviceEngagement property that must be shared with the verifier embedded in a QR
code to establish a secure connection.
Present matching credentials to holder
let credential = try await mobileCredentialHolder.getCredential(credentialId: id)id: Pass the identifier of the credential you want to present, as a string. This information is returned by thecreateProximityPresentationSessionmethod on aonRequestReceivedevent, triggered when the verifier requests a credential for verification.
Your application must then gather the user's consent to share the matching credential with the verifier.
Send a response to the verifier
try await proximityPresentationSession.sendResponse(credentialIds: [id])id: Pass the identifier of the credential you want to send, as a string.
Next steps
- Explore the individual tutorials for detailed step-by-step instructions:
- Review the mDocs Holder SDK overview for platform support and capabilities.
- Use the sample app to claim a credential via an Authorization Code flow to experience this flow.
- Learn more about the SDK Backend, including how to see registered app instances in your MATTR VII tenant.
How would you rate this page?
Last updated on