Start by importing createAppKit, and wagmi packages, then create your configs as shown below.
Finally, pass your configuration to createAppKit.
Make sure you import @walletconnect/react-native-compat before wagmi to avoid any issues.
createAppKit must be called before rendering the <AppKit /> component or any other AppKit UI components. Make sure to call createAppKit at the module level, outside of your React components.
Copy
import "@walletconnect/react-native-compat";import { WagmiProvider } from "wagmi";import { mainnet, polygon, arbitrum } from "@wagmi/core/chains";import { QueryClient, QueryClientProvider } from "@tanstack/react-query";import { createAppKit, defaultWagmiConfig, AppKit,} from "@reown/appkit-wagmi-react-native";// 0. Setup queryClientconst queryClient = new QueryClient();// 1. Get projectId at https://dashboard.reown.comconst projectId = "YOUR_PROJECT_ID";// 2. Create configconst metadata = { name: "AppKit RN", description: "AppKit RN Example", url: "https://reown.com/appkit", icons: ["https://avatars.githubusercontent.com/u/179229932"], redirect: { native: "YOUR_APP_SCHEME://", universal: "YOUR_APP_UNIVERSAL_LINK.com", },};const chains = [mainnet, polygon, arbitrum] as const;const wagmiConfig = defaultWagmiConfig({ chains, projectId, metadata });// 3. Create modalcreateAppKit({ projectId, metadata, wagmiConfig, defaultChain: mainnet, // Optional enableAnalytics: true, // Optional - defaults to your Cloud configuration});export default function App() { return ( <WagmiProvider config={wagmiConfig}> <QueryClientProvider client={queryClient}> // Rest of your app... <AppKit /> </QueryClientProvider> </WagmiProvider> );}
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!
This is an optional feature that enhances the user experience by:
Showing a green checkmark next to installed wallets
Prioritizing installed wallets at the top of the list
All 430+ 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.
Open your Info.plist file.
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.
Coinbase Wallet support is optional. Unlike other wallets that use the WalletConnect protocol, Coinbase Wallet uses its own proprietary SDK. If you skip this setup, Coinbase Wallet simply wonβt appear in your wallet list, but all other wallets will work normally.
Follow these steps to install Coinbase SDK in your project along with our Coinbase package. Check here for more detailed information.
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.