Skip to content

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.

Terminal window
npx expo install @streamline-pulse/creeba-core @streamline-pulse/creeba-expo

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." }]
]
}
}
  • iOS: minimum deployment target 17.5 (set by the plugin), and the cocoapods-spm gem (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.
Terminal window
npx expo prebuild
npx expo run:ios # or: npx expo run:android

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