Privy Mobile Kit Expo example

kit-expo-privy
This is an Expo project pre-configured with Uniwind for styling and Solana libraries.
Technologies
- Expo
- Uniwind (Tailwind CSS for React Native)
- @solana/kit
- @wallet-ui/react-native-kit
Set up Privy
- Log in or sign up at the Privy dashboard.
- On the organization overview, click
New app. - Enter your app name, select
Mobile app, and clickCreate app. - Save the
App ID, then clickClose. - Under
User managementin the sidebar, go toAuthentication. - In the
External walletscard, enableSVM (Solana) wallets. - Go to
App settings>Clients. - Set the app identifier to the
expo.android.packagevalue fromapp.json. - Save the
Client IDfor the default mobile app client. - Copy
.env.exampleto.envand set:
EXPO_PUBLIC_PRIVY_APP_ID=your-privy-app-id
EXPO_PUBLIC_PRIVY_CLIENT_ID=your-privy-client-idDo not put the Privy app secret in .env; this Expo app only uses public client-side Privy identifiers.
Get started
Install dependencies
npm installStart the app
This steps builds the dependencies for the development client.
npm run androidIn the output, you'll find options to open the app in an Android development build:
This template requires native modules and Mobile Wallet Adapter support, so it does not support Expo Go or iOS simulator.
You can start developing by editing the files inside the app directory. This project uses file-based routing.
Test wallet connections
Follow the Solana Mobile development setup to configure a Seeker or Android emulator for testing Mobile Wallet Adapter flows. For emulator development, install the Mock MWA Wallet and open it once before connecting from this app.
If wallet connection fails with java.util.concurrent.CancellationException or -1/authorization request declined, make sure the emulator has a PIN or password set, then restart the mock wallet:
adb shell locksettings set-pin 1234
adb shell am force-stop com.solana.mwalletOpen the mock wallet again so it can create and persist its seed, then try connecting from this app.
Learn more
To learn more about developing your project with Expo, look at the following resources:
- Expo documentation: Learn fundamentals, or go into advanced topics with our guides.
- Uniwind documentation: Learn how to style your app with Tailwind CSS.
- Solana documentation: Learn how to build on Solana.
