AppKit for React Native enables seamless integration with multiple blockchain ecosystems, including EVM chains (like Ethereum, Polygon, etc.), Solana, and Bitcoin. It provides a unified API to manage wallet connections, interact with different chains, and build rich multi-chain applications.
At the core of AppKit is a centralized AppKit instance that handles connection logic, manages various chain adapters, and provides data to your application via a React Context.
Head over to Reown Dashboard and create a new project.
Installation#
AppKit CLI#
Get started quickly with our dedicated CLI that sets up a minimal AppKit configuration for you.
Run the command below and select React Native:
Add AppKit to your existing project#
Installation is a two-step process:
- Install the core AppKit library.
- Install the specific chain adapters you need for your application.
Core Library#
Create babel.config.js#
For Expo SDK 53 and later, you need to create a babel.config.js file in your project root to properly support the valtio library:
This configuration enables the unstable_transformImportMeta option which is required for valtio to work correctly with Expo 53+.
Core Library#
Install our core library and it's dependencies
On iOS, use CocoaPods to add the native modules to your project:
Chain Adapters#
npm install ... or yarn add ....Install the adapters for the chains you intend to support:
For EVM-compatible chains, you can choose between the Ethers.js-based adapter or the Wagmi-based adapter. You should install the one that best fits your project's existing setup or preference.
This adapter uses Ethers.js for interacting with EVM chains.
To initialize the Ethers adapter:
This adapter integrates with Wagmi for state management and EVM interactions. It requires a few more setup steps compared to the Ethers adapter.
1. Install Packages:
First, install the Reown Wagmi adapter and its peer dependencies:
AppKit is only compatible with wagmi 2.x. Ensure you are using a compatible version.
Version Conflicts: Wagmi internally installs multiple versions of viem and valtio which can cause conflicts. If you encounter errors, try overriding these versions in your package.json and re-install the dependencies:
NPM users:
Yarn users:
2. Configure Wagmi and Initialize Adapter:
The WagmiAdapter requires a Wagmi configuration object. You'll create this using createConfig from wagmi (we recommend aliasing it, e.g., to createWagmiConfig, if you also use createConfig from AppKit). This config, defining your chains and transports, is then passed to the WagmiAdapter during its initialization within your AppKit setup file (e.g., src/AppKitConfig.ts).
networks array in AppKit options includes the chains defined in wagmiAdapter.3. Set up Context Providers in App.tsx:
Wagmi requires its own context provider (WagmiProvider) and also relies on TanStack Query (QueryClientProvider). You'll need to wrap your application (or the relevant part of it) with these providers, in addition to the AppKitProvider. The config prop for WagmiProvider must be the wagmiConfig instance from your initialized WagmiAdapter. Refer to the official Wagmi documentation for details on provider setup.
For a practical implementation example, you can refer to the Reown AppKit + Wagmi example on GitHub.
MetaMask does not currently support WalletConnect connections on Solana. The MetaMask team is working on adding this feature. In the meantime, we recommend using other wallets that support Solana. You can find the complete list of supported wallets on WalletGuide.
For Solana, install the Solana adapter:
To initialize the Solana adapter:
For Bitcoin, install the Bitcoin adapter:
To initialize the Bitcoin adapter:
Implementation#
Prerequisites#
Before setting up AppKit, you need to wrap your app with SafeAreaProvider from react-native-safe-area-context. This is required for proper modal rendering and safe area handling.
For more detailed information about SafeAreaProvider, check the official documentation.
1. Initialize AppKit#
Create an instance of AppKit. This is where you'll configure your project ID (if using WalletConnect features) and define the chains your application will support, along with their respective adapters.
To ensure proper functioning with React Native, make sure import "@walletconnect/react-native-compat"; is the very first line in your configuration file (e.g.,
AppKitConfig.ts), even before other imports. This import handles necessary polyfills.
Default Features: AppKit comes with email and social login, swaps, and onramp features enabled by default. To disable any of these features, see the Options documentation for configuration details.
2. Configure Storage#
For data to persist across sessions, you need to provide a storage solution. The createAppKit function accepts a storage option that must conform to the Storage interface.
The Storage interface, which can be imported from @reown/appkit-react-native, is defined as follows:
For complete storage implementation examples, see the Storage Options documentation.
Update AppKit Configuration
Finally, import your custom storage and pass it to createAppKit in your AppKitConfig.ts. This example builds on the configuration from Initialize AppKit:
3. Provide AppKit Instance#
Wrap your application with the AppKitProvider to make the AppKit instance available throughout your component tree via context.
4. Render AppKit UI#
To display the AppKit modal and other potential UI elements, you need to include the <AppKit /> component in your application. If you want the modal to be accessible from anywhere in your app, it's best to place this component within your main application root component (e.g., the YourAppRootComponent from the example above, or directly in App.tsx if it serves as your main layout).
Expo Android Modal Issue: If you're using Expo Router and the modal doesn't open on Android, you may need to wrap the <AppKit /> component in a View with absolute positioning. Here's the workaround:
This is a known issue with Expo Router on Android and this workaround resolves the modal rendering problem.
5. Using AppKit in Components#
You can now access AppKit functionalities (like connecting, getting account state, etc.) using hooks provided by the library.
For detailed examples on specific actions like signing messages, sending transactions, or switching networks, please refer to the Hooks and Examples sections.
Pre-built Components
AppKit includes pre-built components to speed up your development:
<AppKitButton />- A pre-styled connect button<AppKitAccountButton />- A button showing account information when connected
For detailed information about all available components, hooks, and examples for specific actions like signing messages, sending transactions, or switching networks, see the Components, Hooks, and Examples documentation.
Enable Wallet Detection#
Optional feature - This detects wallets installed on the user's device and enhances the user experience by:
- Showing a green checkmark next to installed wallets
- Prioritizing installed wallets at the top of the wallet selection list
All 600+ wallets in the AppKit ecosystem work via WalletConnect protocol regardless of this configuration. You only need to add the wallets your users most commonly have installed.
To enable AppKit to detect wallets installed on the device, you can make specific changes to the native code of your project.
To enable AppKit to detect wallets installed on the device in your Expo project for iOS, follow these steps:
- Open your
app.json(orapp.config.js) file. - Locate the ios section within the configuration.
- Add the
infoPlistobject if it doesn't exist, and within it, include theLSApplicationQueriesSchemesarray. This array will contain the desired wallet schemes you want to detect. - Add the wallet schemes to the
LSApplicationQueriesSchemesarray.
Your configuration should look like this:
To enable AppKit to detect wallets installed on the device in your Expo project for Android, follow these steps:
- Open your
app.json(orapp.config.js) file. - Locate the plugins section within the configuration.
- Add
queries.jsin the plugins array:
- Create the file
queries.js:
- Add the wallet package names you want to be detected by your app.
- Open your
Info.plistfile. - Locate the
<key>LSApplicationQueriesSchemes</key>section. - Add the desired wallet schemes as string entries within the
<array>. These schemes represent the wallets you want to detect. - Refer to our Info.plist example file for a detailed illustration.
Example:
- Open your
AndroidManifest.xmlfile. - Locate the
<queries>section. - Add the desired wallet package names as
<package>entries within the<queries>. These package names correspond to the wallets you want to detect. - Refer to our AndroidManifest.xml example file for detailed guidance.
Example:
Connectors#
Optional feature - These connectors are only needed if you want to support specific wallets that use custom connection protocols. All 600+ wallets in the AppKit ecosystem work via WalletConnect protocol regardless of this configuration.
AppKit supports various custom connectors for specific wallets that use their own connection protocols. These connectors allow you to integrate popular wallets like Coinbase and Phantom directly into your AppKit configuration.
Coinbase#
The new Base Wallet (formerly Coinbase Wallet) does not currently support the Coinbase Mobile Wallet SDK used by this connector. This means the Coinbase connector will not work with Base Wallet until the Base team adds support for the SDK on their end. This is a known limitation on the Base/Coinbase side and not an issue with AppKit. We will update this documentation once the Base team implements SDK compatibility.
Coinbase Wallet is a popular wallet that uses a custom connection protocol. To enable it in your AppKit configuration, you'll need to install the Coinbase SDK and add a specific connector.
Expo Compatibility: Coinbase SDK works with Expo
Prebuild but not with Expo Go. You'll need to use expo prebuild to generate native code before building your app.
To enable Coinbase Wallet, follow these steps:
- Enable Expo Modules in your project:
- Install the Coinbase SDK and our custom connector:
- Run pod-install:
-
Set up deeplink handling in your project following the React Native docs
-
Add Coinbase package configuration to your native files:
- Add the custom connector to your
extraConnectors:
- Add the Coinbase response handler to process wallet responses:
For more detailed information, check the Coinbase docs.
Phantom & Solflare#
Phantom and Solflare are popular wallets on the Solana blockchain. Because they use a custom connection protocol, it requires a specific connector to be added to your AppKit configuration.
To enable Phantom Wallet, you'll need to import the PhantomConnector or SolflareConnector from @reown/appkit-solana-react-native and add it to the extraConnectors array in your createAppKit configuration.
Here's how to update your AppKitConfig.ts file, using the example from the Implementation section as a base:
The cluster option can be set to 'mainnet-beta', 'devnet', or 'testnet' depending on which
Solana cluster you want to connect to.
Examples#
Test Apps#
Want to see AppKit in action? Download our sample AppKit apps below and explore what it can do. Enjoy! 😊
Getting Support 🙋#
Reown is committed to delivering the best developer experience.
If you have any questions, feature requests, or bug reports, feel free to open an issue on GitHub