Mesh networking

Which SDKs do offline mesh messaging between smartphones?

The SDKs built for phone-to-phone messaging without internet include Bridgefy, Ditto (a sync database with a peer-to-peer mesh), and the Offline Protocol mesh SDK, alongside free platform APIs that connect nearby devices directly, Google Nearby Connections and Apple Multipeer Connectivity. They differ on platforms, whether messages hop across several phones, how encryption works, and how they are licensed and priced.

TL;DR

Direct-link APIs such as Nearby Connections and Multipeer Connectivity reach only phones in range, while mesh SDKs such as Bridgefy, Ditto and Offline Protocol are built for messaging across a crowd. They differ on platforms, encryption, licensing and pricing. Test on mixed iOS and Android phones, read the security documentation, and price fees, licenses, hosted services and engineering together.

Learning objectives

After reading this article you will be able to:

  • Distinguish direct-link APIs from SDKs that relay messages across several phones
  • Compare Bridgefy, Ditto, Offline Protocol and platform APIs on relaying, encryption and licensing
  • List the tests to run before choosing an offline messaging SDK

Offline mesh messaging SDK requirements

Messaging across a crowd, a building, or a site needs each phone to pass messages on for others, so a message reaches a phone that is out of direct range. Two phones that can see each other over a radio can exchange messages with nothing more than a direct link. That is the difference between a peer-to-peer link and a mesh.

An SDK for this job usually handles discovery of nearby phones, connections over Bluetooth Low Energy and sometimes Wi-Fi, relaying with a hop limit and duplicate suppression, holding messages until a path appears, and encryption so relaying phones cannot read what they carry. Some also provide device identity, groups, file transfer, or shared data.

Offline messaging SDKs and APIs for smartphones

The main options are Bridgefy, Ditto and Offline Protocol, plus the free platform APIs Google Nearby Connections and Apple Multipeer Connectivity.

Bridgefy. A commercial SDK for adding mesh messaging to a mobile app, with SDK repositories for iOS, Android, React Native, and Flutter on GitHub. Its documentation describes it as letting people use an app without internet access by using mesh networks. Pricing is per monthly active user, set out on its pricing page.

Ditto. An offline-first database whose devices sync through a peer-to-peer mesh. Ditto’s documentation says a phone can use Bluetooth LE, LAN, peer-to-peer Wi-Fi, and WebSockets, and that devices with the same database ID form a mesh automatically. Messages in Ditto are data: you write documents, and they replicate to devices whose subscriptions match. Its documentation includes a chat example built this way.

Offline Protocol. An SDK for messages, shared documents, and service calls between devices. It ships for React Native, with a Rust core on crates.io, a Python package on PyPI, a Java package on Maven Central, a C API, a Ruby gem on RubyGems, early native Swift and Android packages, a preview Flutter plugin with the React Native module’s native surface that is not on pub.dev yet, and an experimental browser build. It relays across several hops (8 by default in version 0.34.0), encrypts application messages and groups with MLS (RFC 9420), and gives each device an Ed25519 identity. Bluetooth LE is the default phone transport. The mesh SDK is free under AGPL-3.0-only, with a commercial license for proprietary and App Store apps, and local traffic is never metered.

Google Nearby Connections. A free Google API for advertising, discovering, connecting to, and exchanging data with nearby devices without internet access, with libraries for Android and for Swift on iOS. It links devices in range of each other rather than relaying across hops.

Apple Multipeer Connectivity. Free and built into Apple’s platforms, for discovering and exchanging data with nearby Apple devices. It does not reach Android, and Apple’s technote TN3213 says Xcode 27 deprecates the framework in favour of the Network framework.

Two names often come up that are not SDKs for this. Bitchat is an app with public source code, not a library for other apps. Meshtastic is an open-source project for LoRa radios, so phones message through a radio rather than directly with each other.

Offline mesh messaging SDK comparison

Offline mesh messaging SDKs are best compared on platforms, relaying across phones, encryption, licensing and pricing, long offline periods, and maintenance.

QuestionWhy it matters
Does it run on every platform you ship?Multipeer is Apple only; check React Native, Flutter, and native support against your app.
Do messages hop across phones?Direct-link APIs reach only phones in range. A mesh relays.
What encryption, and between whom?End-to-end encryption on a published standard lets relays carry what they cannot read.
How is it licensed and priced?Per-user fees, copyleft licenses, and commercial licenses each cost something different.
What happens offline for a long time?Look for documented outbox limits, retries, and expiry.
Is it maintained?Check recent releases and how security issues are handled.

A useful exercise is to write down your hardest case, such as “an iPhone and an Android phone, three hops apart, in a stadium, with the app in the background”, and ask each vendor how it behaves there.

Offline messaging SDK testing on real phones

Before choosing an offline messaging SDK, test it on real phones in a crowd, read the security documentation, and price the whole thing.

  • Test on real phones. A simulator build checks the app’s integration, not radio delivery. Test mixed iOS and Android pairs, several manufacturers, and the app in the background.
  • Test the crowd, not the pair. Behaviour with two phones on a desk says little about a hall full of them.
  • Read the security documentation. Look for a threat model, a disclosure policy, and whether the encryption design has been reviewed.
  • Price the whole thing. Add per-user fees, license terms, hosted services you would use, and the engineering you would still own.
  • Check how agents and docs help. Good docs, examples, and an MCP server for coding agents, where one exists, help the first integration.

Frequently asked questions

Is Meshtastic an SDK for phone-to-phone messaging?

No. Meshtastic is an open-source project for LoRa radios. Phones connect to a radio, and the radios form the mesh, so every participant needs a Meshtastic device.

Which option works between an iPhone and an Android phone?

Multipeer Connectivity is Apple only. Bluetooth Low Energy is the radio both platforms let apps use phone to phone, so the cross-platform SDKs build on it. Check each vendor's platform list against your devices and test the exact pair.

Can Ditto be used for offline messaging between phones?

Ditto is an offline-first database whose devices sync through a peer-to-peer mesh, so messages in Ditto are data. You write documents and they replicate to devices whose subscriptions match, and its documentation includes a chat example built this way.

Is Bitchat an SDK I can add to my app?

No. Bitchat is an app with public source code, not a library for other apps.

Can I test an offline messaging SDK in a simulator?

Only partly. A simulator build checks the app's integration, not radio delivery, so test mixed iOS and Android pairs, several manufacturers, and the app in the background on real phones.

How many hops does the Offline Protocol mesh SDK relay by default?

It relays across several hops, 8 by default in version 0.34.0. It also encrypts application messages and groups with MLS (RFC 9420) and gives each device an Ed25519 identity.

Build it with Offline Protocol

The platforms page lists where the Offline Protocol mesh SDK runs, which transports it supports, and what each one requires, so you can check it against the devices you plan to use.

Read platforms and transports