file: dependency are not required.
This walkthrough is typechecked against the pinned packages. For complete apps, see offline-app-examples: eleven React Native apps on the published Mesh SDK package (^0.30.0 from offline-app-examples#29, ^0.28.0 before it).
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.
The screen requests the Android Bluetooth grants with the SDK’s requestMeshPermissions before starting. It returns at once on iOS, where the system prompts when Bluetooth starts. See Android runtime permissions.
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.

