Caution
This repo is no longer maintained.
The documentation below is provided for historical reference only.
- Node.js
- npm or Yarn
- React Native CLI
- Xcode (for iOS)
If you haven't already created a React Native project, start by initializing one:
npx react-native init your-project-name
Install the latest Expo modules:
npx install-expo-modules@latest
Install the XMTP React Native SDK using npm:
npm install @xmtp/react-native-sdk
Update the Podfile to set the minimum iOS platform. Open the Podfile
in your iOS directory and modify the platform line:
platform :ios, '16.0'
Ensure your Xcode project's target is updated to iOS 16.0 or higher.
Install the Babel plugin required for the XMTP SDK:
npm add @babel/plugin-proposal-export-namespace-from
Update your Babel configuration. Open your babel.config.js
and add the plugin:
module.exports = {
presets: ['module:@react-native/babel-preset'],
plugins: ['@babel/plugin-proposal-export-namespace-from'],
};
Navigate to the iOS directory and install the necessary pods:
cd ios && pod install && cd ..
Finally, start your React Native application:
npm run ios
Head to our docs to understand XMTP's concepts
If you get into issues with Buffer
and polyfills
check out the fix below: