Overview

Use React Native to build mobile apps with Coinbase Developer Platform (CDP) embedded wallets in under 5 minutes! Get up and running fast by integrating our wallet infrastructure into your React Native project with create-cdp-app.
All CDP React hooks are compatible with React Native. Check out the CDP React SDK reference for comprehensive method signatures, types, and examples.

Prerequisites

Minimum Version Requirements

Xcode16.1
iOS15.1
Android StudioLatest stable
Android SDKAPI 24 (min) / API 35 (target)
Android7.0 (API 24)
Let’s get started by scaffolding a new React Native app with the necessary dependencies.

1. Create the React Native app

1

Copy your Project ID

Navigate to CDP Portal and select your project from the top-left dropdown. Clicking the gear icon will take you to your project details:
CDP Project ID in project settings
Copy the Project ID value. You will use this in the next step when configuring your demo app.
2

Create a new React Native app

Use the latest version of create-cdp-app to create a new React Native app:
npm create @coinbase/cdp-app@latest
3

Configure your app

Follow the prompts to configure your app with an embedded wallet. Name your project, select React Native with Expo as a template, and enter your CDP Project ID that you copied in the previous step.
  1. Make sure to select React Native with Expo as a template.
  2. In this example we are using Smart Accounts to create a smart account for new users on sign in. This allows us to pay for transaction fees on behalf of the user.
Ok to proceed? (y) y

> npx
> create-cdp-app

✔ App Name: … my-react-native-app
✔ Template: › React Native with Expo
✔ CDP Project ID (Find your project ID at https://portal.cdp.coinbase.com/projects/overview): … <YOUR_PROJECT_ID>
✔ Enable Smart Accounts? (Smart Accounts enable gasless transactions and improved UX): … yes
4

Run your app

Navigate to your project directory and start the development server:
Be prepared to wait a few minutes the first time you run the app for the dev server and simulator to boot up.
cd my-react-native-app
npm install
npm run ios # or npm run android
On successful startup, you should see your React Native app running on the iOS simulator or Android emulator. Open up the App.tsx file and start editing to see your changes live.
React Native login screen

2. Sign in and send your first transaction

Now that your embedded wallet is configured and your app is running, let’s try it out.
1

Authenticate with email or SMS

Choose between email or SMS to receive a verification code.
SMS authentication is currently available only for United States based phone numbers.
React Native authentication method screen
2

Verify

Enter the verification code sent to your email or phone number.
React Native OTP screen
3

View your new wallet

Congrats! Your new embedded wallet has been created, authenticated, and is ready to use on all EVM compatible networks.
We’re using Smart Accounts in this example. If you’re not using Smart Accounts, you will see a slightly different transaction screen, with a link to get testnet ETH instead of USDC.
React Native post login screen
4

Send your first transaction

The demo app uses the wallet to send itself some testnet tokens on Base Sepolia.Get some testnet funds by tapping the Get funds from faucet button which will give you a link to the CDP Portal Faucet prefilled with your wallet address and token. Once you claim the funds, the balance shown in the app will update automatically. Finally, tap Transfer to initiate the transfer. Once complete, you’ll see a transaction hash and a button to copy a link to the blockchain explorer.
If you used the same configuration from above, you will have a Smart Account who’s transaction fees will be automatically paid for by a feature called Gas Sponsorship.
React Native wallet demo showing transaction flow
🎉 You’ve successfully created an embedded wallet and sent your first transaction on mobile!