fix(react-native-mdocs-holder-tutorial): set bleMode to MDocPeripheralServer - #339
Merged
Merged
Conversation
…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.
dylan-paul
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Sets
bleMode: BleMode.MDocPeripheralServeron 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 --noEmitinreact-native-mdocs-holder-tutorial-completeis clean, both before and after this change.bleModeis typed asBleMode | undefined, whereBleModeis a string enum, so the enum member is required. Verified against the installed SDK (@mattrglobal/mobile-credential-holder-react-native10.0.0) with a small assignability probe:BleMode.MDocPeripheralServertypechecks, while the bare string"MDocPeripheralServer"fails withTS2322: 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