light-mode-image
Learn

Changelog

Release notes for the @mattrglobal/mobile-credential-verifier-react-native package.

10.0.0

Breaking Changes

Online presentation results are now discriminated unions

The OnlinePresentationSessionResult type returned by requestMobileCredentials(...) and AppleWallet.requestMobileCredentials(...) is now an isSuccess-discriminated union instead of a single object with optional fields. TypeScript will enforce which fields are available after narrowing.

Before:

if (result.error) {
  console.log(result.error.message);
} else {
  console.log(result.mobileCredentialResponse?.credentials);
}

After:

if (result.isSuccess) {
  // result is OnlinePresentationSessionSuccess — mobileCredentialResponse may be absent
  console.log(result.mobileCredentialResponse?.credentials.length);
} else {
  // result is OnlinePresentationSessionFailure — error is guaranteed
  console.log(result.error.message);
}
  • OnlinePresentationSessionSuccess has isSuccess: true, sessionId, optional challenge, and optional mobileCredentialResponse. The mobileCredentialResponse is absent when the verifier is configured to deliver results via the back channel only (i.e. the credentials are sent to the verifier's server, not returned to the wallet).
  • OnlinePresentationSessionFailure has isSuccess: false, sessionId, optional challenge, and error.
  • The error field is no longer optional — it is always present on failure results and never present on success results.

MobileCredentialResponse arrays are now required

The credentials and credentialErrors fields on MobileCredentialResponse are now required non-optional arrays. They are always present in the response, including as empty arrays when there are no items.

  • Remove any optional chaining (?.) or null checks on credentials and credentialErrors.
  • Both fields are guaranteed to be arrays and will never be undefined or null.

Revocation status list refresh results are now discriminated unions

The RevocationStatusListsRefreshResult type returned by refreshRevocationStatusLists() is now an isSuccess-discriminated union. The previous success: boolean field has been replaced with isSuccess: boolean. Before:

if (result.success) {
  console.log("Updated");
} else {
  console.log(result.failedLists);
}

After:

if (result.isSuccess) {
  // result is RevocationStatusListsRefreshSuccess
  console.log("Updated");
} else {
  // result is RevocationStatusListsRefreshFailure — failedLists is guaranteed
  console.log(result.failedLists);
}
  • The success field has been removed. Use isSuccess instead.
  • failedLists is only present on failure results and is no longer optional when present.

nextUpdate no longer includes null in its type

The nextUpdate field on RevocationStatusListsRefreshSuccess, RevocationStatusListsRefreshFailure, and GetRevocationStatusListsCacheInfo has been narrowed from Date | null | undefined to Date | undefined.

The runtime value was never null (the validator already converted null to undefined), so this change aligns the type with actual runtime behavior. Remove any explicit null checks on nextUpdate — use undefined checks or optional chaining instead.

VerificationResult now requires reason on failure

The VerificationResult type is now a discriminated union on verified. When verified is false, the reason field is required and always present. When verified is true, the reason field is not present.

  • Remove any optional chaining on reason when handling verification failures — it is guaranteed to be present.

9.0.5

Bug Fixes

  • Fixed a proximity presentation issue on iOS where the verification result was not delivered if the holder ended the session right after sending its response (with the Holder acting as BLE peripheral server). The disconnect was sometimes handled before the response finished processing, so a session-terminated error appeared instead of the result. The SDK now finishes processing the response before handling the disconnect.

9.0.4

Bug Fixes

  • Fixed an issue on Android where long Status List distribution URLs would fail to parse, resulting in the SDK not being able to download and use the list.

9.0.3

Bug Fixes

  • Fixed an issue on iOS where verification results were not displayed during proximity presentation sessions when BLE mode was set to Peripheral Server and Auto Terminate Session was enabled.

9.0.2

Bug Fixes

  • Fixed an issue on Android devices where status checks could not be turned off. The React Native bridge now correctly honours the checkStatus option, allowing apps to disable status checks on Android devices when required.

9.0.1

Bug Fixes

  • Fixed an issue where native binaries were not included in the builds published to NPM.
  • Fixed an iOS/Android inconsistency in requestCredentials to normalize behavior across platforms.

9.0.0

Breaking Changes

New types returned by the initialize method

The initialize method now accepts options and returns a Result type. All call sites must handle the result and possible errors.

Simplified status check parameter

Replaced skipStatusCheck with checkStatus on sendProximityPresentationRequest (and related APIs). Note that the logic is inverted:

  • true (default): Perform a revocation status check for presented credentials.
  • false: Do not perform a revocation status check.

New value in ProximityPresentationSessionTerminationErrorType

New Exception value was added to ProximityPresentationSessionTerminationErrorType. This is a fallback when an unexpected issue occurs during presentation.

NFC engagement error handling

The registerForNfcDeviceEngagement method's error handling was updated to route parse failures to onError instead of rethrowing.

Package path change

The package path for global.mattr.mobilecredential.common has been updated to global.mattr.mobilecredential.verifier. Please ensure that you update your imports accordingly to avoid any issues with module resolution.

Features

App-to-app verification

The SDK now supports app-to-app verification, allowing you to accept an mDoc for verification from another application installed on the same device.

Verify with Apple Wallet

The SDK now supports requesting and verifying a credential directly from an Apple Wallet using the Verify with Wallet API. Only available for iOS 16 and above.

Status Lists Draft 14 Support

The SDK now supports the Token Status List Draft 14 specification while maintaining existing support for Draft 3.

  • Added support for the application/statuslist+cwt content type header as defined in Section 8.2 of the specification, while maintaining support for the existing mattr-statuslist+cwt type.
  • Added support for the updated status list URL format where status lists are represented as an array of URI strings rather than an array of objects.
  • The SDK respects rate limit response headers returned with HTTP 429 responses from status list endpoints, with a configurable default delay for rate-limited requests.

COSE algorithm updates

Updated COSE algorithms (as per RFC 9864) strengthen cryptographic compatibility and ensure continued compliance with evolving standards.

Logger configuration

  • initialize now supports an optional loggerConfiguration parameter to configure the logging level.

New destroy method

The SDK now has a destroy method that completely resets the SDK state. Calling this function clears all persisted SDK storage and permanently deletes all stored certificates, returning the SDK to a clean, uninitialized state.

8.1.1

This is a maintenance release. It includes improvements to support future capabilities.

8.1.0

This is a maintenance release. It includes improvements to support future capabilities.

8.0.0

Breaking changes

  • The React Native supported versions for the SDK is now 0.78.x or higher, including React Native’s New Architecture.

Spelling standardization change (UK → US English)

The following changes reflect the update of the SDK's spelling convention from UK English to US English.

  • Methods:
    • Renamed the initialise function to initialize.
    • Renamed the deinitialise function to deinitialize.
  • Errors:
    • Renamed MobileCredentialVerifierErrorType.SdkNotInitialised to MobileCredentialVerifierErrorType.SdkNotInitialized.

Error handling consolidation

  • The createProximityPresentationSession method was updated as follows:
    • The onError callback function could be invoked with the following errors:
      • MobileCredentialVerifierErrorType.FailedToCreateProximityPresentationSession when encountered issue while creating a presentation session.
      • MobileCredentialVerifierErrorType.UnknownError when encountered an unknown exception during the presentation session.
    • The function could return MobileCredentialVerifierErrorType.IllegalState error when received an unexpected function call. For example, when there is no established presentation session.
  • The sendProximityPresentationRequest method was updated as follows:
    • Added a new verification failure reason MobileCredentialVerificationFailureType.TrustedIssuerCertificateNotFound when a presented credential cannot be verified due to missing a matched trusted issuer certificate.

Features

  • iOS Platform

    • The SDK now includes a check for empty CBOR arrays. Previously the SDK allowed credentials with an empty IssuerNamespaces field, but according to the Concise Data Definition Language (CDDL) specification defined in ISO/IEC 18013-5, this field must contain at least one entry. This update enforces that requirement, improving interoperability and ensuring issued credentials are standards-compliant.

7.2.0

Enhancements

  • Introduced an isInitialised method, which indicates if the SDK is currently initialized.
  • Introduced a deinitialise method that will terminate the current presentation session if one exists and close access to the SDK storage.
  • [iOS] The SDK's storage data protection class was changed from C (Protected Until First User Authentication) to B (Protected Unless Open). See Apple Platform Security forum for details.

Bug fixes

  • Resolved a potential crash when establishing a BLE connection.
  • Fixed validation for ES384 and ES512 signatures.

7.1.0

Features

  • Added support for React Native versions: 77, 78, 79.

Fixes

  • Fixed an issue with the callback on a terminated proximity session. Use the onTerminated callback instead of onSessionTerminated.
  • Resolved issues related to Bluetooth permissions handling and session termination.

7.0.0

BREAKING CHANGES

  • The createProximityPresentationSession method was updated as follows:
    • It now requires a ProximityPresentationSessionListener as a parameter instead of ProximityPresentationSession.OnSessionTerminated.
    • It now returns nothing and is neither blocking nor suspending. To handle the successful creation of a session, implement the onEstablished method within the ProximityPresentationSessionListener protocol.
    • Errors must be handled by implementing the onError method within the ProximityPresentationSessionListener protocol.
  • The sendProximityPresentationRequest method replaces ProximityPresentationSession.requestMobileCredentials.
  • The terminateProximityPresentationSession method replaces ProximityPresentationSession.terminateSession.
  • Removed the getInstance method. MobileCredentialVerifier is now only accessed as an object internally.
  • Removed the getCurrentProximityPresentationSession method. The ProximityPresentationSession class is now an internal class.

Features

  • Added NFC session support for Android devices only via registerForNfcDeviceEngagement and deregisterForNfcDeviceEngagement.

Fixes

  • Fixed an issue where proximity presentation sessions would not terminate when Bluetooth was disabled.

6.0.0

BREAKING CHANGES

  • Removed statusInfo from verification results for mobile credential presentations.

Features

  • The minimum deployment target for iOS is now 13. While the SDK functionalities are still only available from iOS 15 or higher, this enables launching the app in iOS 13 without crashing, as long as the SDK is not initialized.
  • Added MobileCredentialVerificationFailureType enum types to verification result reason.

Fixes

  • Refined the minimum supported iOS version in podspec.
  • The initialise method throws a runtime exception when the iOS system version is not supported.

5.0.0

Features

  • This SDK can now be used in the same application with compatible versions of the mobile-credential-holder-react-native SDK, as detailed in the installation section.

mDocs Revocation Support

  • The SDK now supports mDocs revocation.
  • The sendProximityPresentationRequest method now verifies the status of presented revocable mDocs.
  • MobileCredentialStatusListInfo was added to the return type for both methods under MobileCredentialResponse.credentials[].statusInfo. It is used to:
    • Indicate the credential's status.
    • Detail any error when retrieveing the credential's status fails.
  • The getTrustedIssuerStatusListsCacheInfo method was added to retrieve cache details of previously retrieved status lists.
  • The updateTrustedIssuerStatusLists method was added to update status lists when required.
    • Best Practice: It is recommended to call this method before MobileCredentialStatusListInfo.nextUpdate (retrieved from getTrustedIssuerStatusListsCacheInfo) expires to keep status lists up-to-date. This approach offers two advantages:
      • It may reduce wait times for subsequent sendProximityPresentationRequest calls, as network requests may be needed to verify a credential's status if the cached status list expires.
      • It can facilitate offline verification.

BREAKING CHANGES

  • The sendProximityPresentationRequest method now checks the status of presented revocable mDocs by default. To opt out of this behavior you must set the new skipStatusCheck parameter to true.

4.0.0

BREAKING CHANGES

  • The SDK now require peer dependencies of react native 0.73.x.

  • Realm database has been replaced with a custom storage system. Upgrading to this version will result in all mDocs related data being lost. This includes all trusted issuer certificates and credentials.

  • The addTrustedIssuerCertificates method error types were updated as follows:

    • Added MobileCredentialVerifierErrorType.FailedToStoreCertificate when the given certificate is invalid.
    • Removed MobileCredentialVerifierErrorType.InvalidCertificate.
  • The sendProximityPresentationRequest method error types were updated as follows:

    • Added ProximityPresentationSessionErrorType.UnsupportedCurve.
    • Added ProximityPresentationSessionErrorType.RequestAlreadyInProgress.
    • Removed ProximityPresentationSessionErrorType.MobileCredentialVerificationFailed.
  • The createProximityPresentationSession method error types were updated as follows:

    • Added ProximityPresentationSessionErrorType.UnsupportedCurve.
  • Instead of throwing an exception, the sendProximityPresentationRequest method now returns a MobileCredentialResponse with a credentials[x].verificationResult field to provide a more detailed verification status (e.g. invalid credential, etc.).

Features

  • iOS Platform

    • addTrustedIssuerCertificates can now also accept input in the form of an unformatted PEM string.

3.0.0

BREAKING CHANGES

  • The createProximityPresentationSession method could return the following errors:

    • MobileCredentialVerifierErrorType.BluetoothDisabled when Bluetooth is powered off.
  • The sendProximityPresentationRequest method could return the following errors:

    • MobileCredentialVerifierErrorType.SessionTerminated when the current proximity presentation session is terminated.
  • The onSessionTerminated callback function for createProximityPresentationSession method could be invoked with the following errors:

    • ProximityPresentationSessionTerminationError.ResponseNotReceived when mobile credential response not received from holder.

Features

  • Allow additional extended key usage in a document signer certificate.
  • Allow clock skew tolerance during verification.

Bug Fixes

  • To mitigate a potential race condition issue, we have improved the process of generating new encryption keys.

iOS specific

  • Fixed an issue where Bluetooth sessions might have been terminated before data exchange is completed. This can occur when the developer terminates the session after receiving a single response, but that response doesn't include all the required data. This might happen on devices with lower data transmission speed or when the response size is too big.

Android specific

  • Fixed an issue where the SDK was unable to handle mobile credential presentation responses with floating point claims.

Notes

  • The SDK now supports React Native 0.72.14.

2.0.0

BREAKING CHANGES

  • Refined structure for credential errors in MobileCredentialResponse objects

Features

  • Added support for Android platform

Bug Fixes

  • Fixed error handler for createProximityPresentationSession and sendProximityPresentationRequest functions
  • Fixed createProximityPresentationSession to unregister React Native event listeners on error

Notes

  • Dependency upgrades and vulnerability fixes

1.0.1

Notes

  • Enhance documentation

1.0.0

Features

  • Add support for mobile credential (ISO Only). The current functionality includes

    • Manage mobile credential trusted issuer certificates
    • Request mobile credentials from a credential holder device

How would you rate this page?

On this page