Use in an Expo app
On mobile the transport is provided by @streamline-pulse/creeba-expo, a native
module (Swift/Kotlin via iroh-ffi) that implements the same SyncTransport. It
speaks the same ALPN + wire format as the desktop, so mobile and desktop peers
interoperate on the LAN.
1. Install
Section titled “1. Install”npx expo install @streamline-pulse/creeba-core @streamline-pulse/creeba-expo2. Register the config plugin
Section titled “2. Register the config plugin”In app.json / app.config.js — it wires up the iOS local-network permission +
Bonjour service and the Android network/multicast permissions:
{ "expo": { "plugins": [ ["@streamline-pulse/creeba-expo", { "localNetworkUsageDescription": "MyApp uses the local network to discover nearby peers." }] ] }}3. Prerequisites & prebuild
Section titled “3. Prerequisites & prebuild”- iOS: minimum deployment target 17.5 (set by the plugin), and the
cocoapods-spmgem (gem install cocoapods-spm) so the iroh-ffi Swift Package resolves. - Android: no extra step — the plugin adds the permissions and the JNA dependency automatically.
npx expo prebuildnpx expo run:ios # or: npx expo run:android4. Wire the transport
Section titled “4. Wire the transport”Use IrohExpoTransport exactly like IrohMdnsTransport on desktop:
import { CreebaSync } from '@streamline-pulse/creeba-core'import { IrohExpoTransport } from '@streamline-pulse/creeba-expo'
const sync = new CreebaSync<ChatMessage>({ transport: new IrohExpoTransport<ChatMessage>(), identity: { userId: 'abc', metadata: { name: 'alice' } }, topic: 'creeba-chat',})await sync.start()A project by Streamline Pulse