file: dependency are not required.
This walkthrough is typechecked against the pinned packages. For complete apps on the same package, see offline-app-examples: four React Native apps on Mesh SDK 0.27.0.
Create the host
Install the platform development tools from the React Native environment guide: Node, JDK 17 and Android Studio for Android; Xcode and CocoaPods for iOS. Use Node 22 for this walkthrough.Add the messaging module
Createmesh.ts in the project root. Copy the complete TypeScript module from Start and discover a peer, including its imports and exported functions.
Create permissions.ts in the project root. Copy the complete requestMeshPermissions helper, including its React Native imports, from Android runtime permissions. The helper returns immediately on iOS; the system prompts when Bluetooth starts.
Add the screen
ReplaceApp.tsx with:
OfflineProtocol, perform a full app reload. Do not call destroy() when stopping and restarting this screen.
Run and check
Start Metro withnpm start. In another terminal run npm run android or npm run ios, choosing a physical device. Install and launch the same app on the second phone.
- Tap Start mesh on both phones and grant permissions.
- Check the discovered
off1address and reportedbletransport. - Tap Send inspection update for the discovered peer. The SDK queues the message until its encrypted session is ready; a queued ID is not delivery.
- Confirm the JSON appears on the receiving phone and the sender reports SDK delivery.
- Turn off cellular and Wi-Fi, leaving Bluetooth enabled. Repeat.
- Stop and start both instances and repeat to check listener reuse.

