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-rc4 for Browser, Node, React Native, Android, iOS, and Agent clients. Use ghcr.io/xmtp/backend:8.0.0-rc4 for the backend. Pin the exact release candidate version. The published Browser 7 and Node 6 packages use an earlier backend API.

Browser, Node, React Native, and Agent packages

Section titled “Browser, Node, React Native, and Agent packages”

Use the package for your platform:

PlatformPackage
Browser@xmtp/[email protected]
Node@xmtp/[email protected]
React Native@xmtp/[email protected]
Agent@xmtp/[email protected]

Run one command from your app directory. These commands install the Browser SDK. For Node, React Native, or Agent, replace the entire package specifier @xmtp/[email protected] with its package and version from the table.

Terminal window
npm install --save-exact @xmtp/[email protected]

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-rc4")
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-rc4 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-rc4")
// 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.