Skip to content

Install the XMTP SDK

Install the SDK for your platform. All SDKs use a backend URL. See Create a client for client options and Run the backend if you operate the backend.

Use 8.0.0-rc1 for Browser, Node, Android, iOS, and Agent clients. Use ghcr.io/xmtp/backend:8.0.0-rc1 for the backend. Pin the exact release candidate version. The published Browser 7 and Node 6 packages use an earlier backend API.

Use the package for your platform:

PlatformPackage
Browser@xmtp/browser-sdk@8.0.0-rc1
Node@xmtp/node-sdk@8.0.0-rc1
Agent@xmtp/agent-sdk@8.0.0-rc1

Run one command from your app directory. These commands install the Browser SDK. For Node or Agent, replace @xmtp/browser-sdk with the package name in the table.

Terminal window
npm install --save-exact @xmtp/browser-sdk@8.0.0-rc1

Install the complete package. Keep the generated source, native or WASM bindings, and runtime assets together.

Add the XMTP Maven artifact to your app module:

android {
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
isCoreLibraryDesugaringEnabled = true
}
}
dependencies {
implementation("org.xmtp:android:8.0.0-rc1")
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.5")
}

Import uniffi.xmtp_sdk.*. Keep the generated sources and JNI libraries from the same release. An older network SDK cannot use this backend.

Add libxmtp as a Swift package in Xcode. Select the ios-8.0.0-rc1 tag and add the XmtpSdk product to your app. For a Swift package, add these dependency and target entries:

// In Package.dependencies:
.package(url: "https://github.com/xmtp/libxmtp.git", revision: "ios-8.0.0-rc1")
// In your app target's dependencies:
.product(name: "XmtpSdk", package: "libxmtp")

The release package supplies the matching native binary. Import XmtpSdk.

Use Node.js 22.12.0 or later for package tooling and a bundler that supports WebAssembly. The Browser SDK stores its database in browser storage and does not encrypt it. Do not pass storage.encryptionKey; the Browser SDK rejects it.