Skip to content

fix(verifier): support SDK Tethering in iOS & Android verifier sample apps#305

Merged
avner-m merged 5 commits into
masterfrom
fix/verifier-failuretype-rawvalue
Jun 29, 2026
Merged

fix(verifier): support SDK Tethering in iOS & Android verifier sample apps#305
avner-m merged 5 commits into
masterfrom
fix/verifier-failuretype-rawvalue

Conversation

@avner-m

@avner-m avner-m commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Fixes a set of issues that prevent the iOS and Android verifier tutorial sample apps from building and running against the tethered Verifier SDK (Android Verifier SDK v7.0.0+ / the matching iOS release), where the SDK is tethered to a MATTR VII tenant and requires a PlatformConfiguration at initialization.

1. Android: wrong PlatformConfiguration import (build error)

Both Android verifier samples imported PlatformConfiguration from the common package:

import global.mattr.mobilecredential.common.platformconfig.PlatformConfiguration   // ❌ does not resolve

The published Verifier SDK artifact repackages the common sources — Verifier/transform-sources.gradle rewrites global.mattr.mobilecredential.common to global.mattr.mobilecredential.verifier — so the class ships under the verifier namespace. Corrected to:

import global.mattr.mobilecredential.verifier.platformconfig.PlatformConfiguration  //

Applied to both:

  • android-in-person-verifier-tutorial-sample-app
  • android-remote-verification-tutorial-sample-app

2. iOS build error: failureType?.message does not compile

Value of type 'MobileCredentialVerificationFailureType' has no member 'message'

MobileCredentialVerificationFailureType is a String-backed enum with no message propertymessage only exists as an internal CodingKey. Switched to the enum's rawValue, which is the human-readable failure message (e.g. "mDoc authentication failed").

Applied to both sample apps:

  • ios-in-person-verifier-tutorial-sample-app
  • ios-remote-verification-tutorial-sample-app

3. iOS crash on "Scan QR Code": missing camera usage description

This app has crashed because it attempted to access privacy-sensitive data
without a usage description. The app's Info.plist must contain an
NSCameraUsageDescription key...

The in-person sample uses GENERATE_INFOPLIST_FILE = YES and declared no camera usage description. Added to both the Debug and Release configs:

  • INFOPLIST_KEY_NSCameraUsageDescription — for QR scanning.
  • INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription — for the subsequent BLE proximity session, which would otherwise crash on the next step.

The remote verification sample uses neither camera nor Bluetooth, so it needs no usage descriptions.

4. Android in-person sample: extract tenant config into a Constants file

Tethering requires a tenant-specific PlatformConfiguration. MainActivity.kt hard-coded the tenantHost and applicationId placeholders inline. Moved them into a new Constants.kt (TENANT_HOST / APPLICATION_ID) with guidance comments, and updated MainActivity to read from it — giving a single, documented place to drop in tenant-specific values.

5. Repo hygiene

Added docs/superpowers/ to .gitignore so Superpowers process artifacts (specs/plans) don't get committed to product PRs.

Out of scope (follow-ups)

The React Native verifier tutorials reference verificationResult.reason.message. That's a different (JS) SDK with a different result shape and was not touched here.

🤖 Generated with Claude Code

MobileCredentialVerificationFailureType is a String-backed enum and has
no member 'message' (message only exists as an internal CodingKey), so
'failureType?.message' fails to compile:

  Value of type 'MobileCredentialVerificationFailureType' has no member 'message'

Use the enum's rawValue, which is the human-readable failure message
(e.g. "mDoc authentication failed"). Fixes both the in-person and remote
verification tutorial sample apps.
@avner-m avner-m requested a review from a team as a code owner June 26, 2026 03:14
…on sample

The in-person verifier sample app uses GENERATE_INFOPLIST_FILE with no
camera usage description, so the app crashes when tapping 'Scan QR Code':

  This app has crashed because it attempted to access privacy-sensitive
  data without a usage description. The app's Info.plist must contain an
  NSCameraUsageDescription key...

Add INFOPLIST_KEY_NSCameraUsageDescription for QR scanning and
INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription for the subsequent BLE
proximity session (which would otherwise crash on the next step), to
both the Debug and Release build configurations.
@avner-m avner-m changed the title fix(verifier): use failureType rawValue in iOS verifier sample apps fix(verifier): iOS verifier sample build error + scan-QR camera crash Jun 26, 2026
avner-m added 3 commits June 29, 2026 13:53
…er samples

The Verifier SDK artifact repackages common sources from
global.mattr.mobilecredential.common to global.mattr.mobilecredential.verifier
(see Verifier/transform-sources.gradle in android-mobile-credential-sdks), so
PlatformConfiguration ships under ...verifier.platformconfig, not ...common.
Both Android verifier sample apps used the common import and failed to compile.
@avner-m avner-m changed the title fix(verifier): iOS verifier sample build error + scan-QR camera crash fix(verifier): support SDK Tethering in iOS & Android verifier sample apps Jun 29, 2026
@avner-m avner-m merged commit 7c2ecae into master Jun 29, 2026
2 checks passed
@avner-m avner-m deleted the fix/verifier-failuretype-rawvalue branch June 29, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants