Skip to content

fix(react-native-mdocs-holder-tutorial): set bleMode to MDocPeripheralServer - #339

Merged
avner-m merged 1 commit into
masterfrom
am/rn-holder-ble-peripheral-mode
Sep 10, 2026
Merged

avner-m merged 1 commit into
masterfrom
am/rn-holder-ble-peripheral-mode

Conversation

@avner-m

@avner-m avner-m commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

What

Sets bleMode: BleMode.MDocPeripheralServer on the proximity presentation session in the completed React Native mDocs holder tutorial app.

Why

The proximity presentation tutorial documents this option and explains the reasoning: many modern POS terminals do not support BLE server mode, so starting the session with the holder as the BLE peripheral server maximizes compatibility when those terminals act as mDoc verifiers. The completed app was still relying on the SDK default, so a reader following the tutorial ended up with code that did not match the finished sample.

The Android and iOS tutorial apps already set the equivalent option.

Testing

npx tsc --noEmit in react-native-mdocs-holder-tutorial-complete is clean, both before and after this change.

bleMode is typed as BleMode | undefined, where BleMode is a string enum, so the enum member is required. Verified against the installed SDK (@mattrglobal/mobile-credential-holder-react-native 10.0.0) with a small assignability probe: BleMode.MDocPeripheralServer typechecks, while the bare string "MDocPeripheralServer" fails with TS2322: Type '"MDocPeripheralServer"' is not assignable to type 'BleMode | undefined'.

A companion MATTR Learn PR corrects the tutorial snippet, which was publishing the bare string form.

🤖 Generated with Claude Code

…lServer

Many modern POS terminals do not support BLE server mode. Starting the
proximity presentation session with the holder as the BLE peripheral server
maximizes compatibility when those terminals act as mDoc verifiers.

The proximity presentation tutorial on MATTR Learn documents and explains this
option, but the completed app was still relying on the SDK default, so the two
did not match.
@avner-m
avner-m requested a review from a team as a code owner September 10, 2026 03:01
@avner-m
avner-m merged commit 4a34445 into master Sep 10, 2026
2 checks passed
@avner-m
avner-m deleted the am/rn-holder-ble-peripheral-mode branch September 10, 2026 03:14
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