AppKit instance that handles connection logic, manages various chain adapters, and provides data to your application via a React Context.
Don't have a project ID?
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.
- Expo
- React Native CLI
Chain Adapters
For React Native CLI projects, use
npm install ... or yarn add ....- EVM
- Solana
- Bitcoin
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.
- Ethers
- Wagmi
This adapter uses Ethers.js for interacting with EVM chains.
To initialize the Ethers adapter:
Implementation
Prerequisites
Before setting up AppKit, you need to wrap your app withSafeAreaProvider from react-native-safe-area-context. This is required for proper modal rendering and safe area handling.
Expo users: You can skip this step as it’s already handled internally by Expo.
SafeAreaProvider, check the official documentation.
1. Initialize AppKit
Create an instance ofAppKit. 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. ThecreateAppKit 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:
createAppKit in your AppKitConfig.ts. This example builds on the configuration from Initialize AppKit:
3. Provide AppKit Instance
Wrap your application with theAppKitProvider 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 This is a known issue with Expo Router on Android and this workaround resolves the modal rendering problem.
<AppKit /> component in a View with absolute positioning. Here’s the workaround:5. Using AppKit in Components
You can now access AppKit functionalities (like connecting, getting account state, etc.) using hooks provided by the library.<AppKitButton />- A pre-styled connect button<AppKitAccountButton />- A button showing account information when connected
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
- Expo
- React Native CLI
- iOS
- Android
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.
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.
Coinbase
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.- 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:
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 thePhantomConnector 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
- Wagmi
- Ethers
- Ethers v5
AppKit with Wagmi example
Check the React Native example using Wagmi