Quickstart for the React Native XMTP client SDK
The React Native XMTP client SDK (xmtp-react-native
) provides a package you can use to build with XMTP in a React Native or Expo app.
Build with this SDK to provide messaging between blockchain wallet addresses, including DMs, notifications, announcements, and more.
This SDK is in Pre-Preview status and ready for you to start experimenting with. However, we do not recommend using Pre-Preview software in production apps. Software in this status will change as we add features and iterate based on feedback.
We're still working on adding several features to bring this SDK to parity with the XMTP client SDK for JavaScript (xmtp-js
). Here's a list of features and issues we're working on.
Is there a feature you need that's not on the list? Please open an issue.
Or better yet, open a PR and we'll get it reviewed and merged as soon as possible. If you contribute a PR that gets merged into this repo, you'll be eligible to claim this XMTP contributor POAP!
Example app
The xmtp-react-native
repo also provides an example app that you can use to experiment with and explore implementation details.
Follow the React Native guide to set up a CLI environment.
To use the example app, run:
cd example
npm install --force
npm run [ios or android]
Install in a managed Expo project
npx expo prebuild
Install in a bare React Native project
For bare React Native projects, install and configure the expo
package before continuing.
Add the package to your npm dependencies
npm i @xmtp/react-native-sdk
Configure for iOS
npx pod-install
We're working on testing the end-to-end installation and will provide more platform-specific configuration details.
Configure for Android
Your app must use Android minSdkVersion = 22
to work with the xmtp-react-native
SDK.
We're working on testing the end-to-end installation and will provide more platform-specific configuration details.