### Launch Moti Example with Expo CLI Source: https://github.com/expo/examples/blob/master/with-moti/README.md Use this command to quickly set up and launch the Moti example project in your Expo environment. Ensure you have Node.js and npm/yarn installed. ```bash npx create-expo --example with-moti ``` -------------------------------- ### Create Expo Example Source: https://github.com/expo/examples/blob/master/with-webrtc/README.md Use this command to create a new Expo project with the WebRTC example pre-configured. ```sh npx create-expo --example with-webrtc ``` -------------------------------- ### Create Expo Project with Example Source: https://github.com/expo/examples/blob/master/README.md Use this command to create a new universal React and React Native project from an Expo example. Specify the example name after `--example`. ```sh npx create-expo --example ``` ```sh bun create expo --example ``` ```sh bun create expo --example with-router-ai ``` -------------------------------- ### Install Dependencies and Run Expo Project Source: https://github.com/expo/examples/blob/master/with-moti/README.md After cloning or creating the project, install the necessary packages using yarn or npm. Then, start the Expo development server. For native iOS development, run `npx pod-install`. ```bash yarn install npm install ``` ```bash yarn start npm run start ``` ```bash npx pod-install ``` -------------------------------- ### Create Expo App with GraphQL Example Source: https://github.com/expo/examples/blob/master/with-graphql/README.md Use this command to create a new Expo project pre-configured with the GraphQL example. ```bash npx create-expo-app --example with-graphql ``` -------------------------------- ### Create Expo App with Satori Example Source: https://github.com/expo/examples/blob/master/with-satori/README.md Use this command to create a new Expo project pre-configured with the Satori example. ```sh npx create-expo-app -e with-satori ``` -------------------------------- ### Install Packages Source: https://github.com/expo/examples/blob/master/with-widgets/README.md Install necessary packages using yarn or npm. ```bash yarn npm install ``` -------------------------------- ### README.md Template for Expo Examples Source: https://github.com/expo/examples/blob/master/contributing.md A standard template for example README files, including sections for title, description, platform support badges, launch instructions, setup, and notes. Use this structure to ensure consistency across all examples. ```markdown # Example <p> <!-- iOS --> <img alt="Supports Expo iOS" longdesc="Supports Expo iOS" src="https://img.shields.io/badge/iOS-4630EB.svg?style=flat-square&logo=APPLE&labelColor=999999&logoColor=fff" /> <!-- Android --> <img alt="Supports Expo Android" longdesc="Supports Expo Android" src="https://img.shields.io/badge/Android-4630EB.svg?style=flat-square&logo=ANDROID&labelColor=A4C639&logoColor=fff" /> <!-- Web --> <img alt="Supports Expo Web" longdesc="Supports Expo Web" src="https://img.shields.io/badge/web-4630EB.svg?style=flat-square&logo=GOOGLE-CHROME&labelColor=4285F4&logoColor=fff" /> </p> description ## Launch your own [![Launch with Expo](https://github.com/expo/examples/blob/master/.gh-assets/launch.svg?raw=true)](https://launch.expo.dev/?github=<GH_URL>) ## How to use <!-- Setup instructions --> ## 📝 Notes <!-- Link to related Expo or library docs --> ``` -------------------------------- ### Create Expo Example Project Source: https://github.com/expo/examples/blob/master/with-pdf/README.md Use this command to create a new Expo project with the PDF example pre-configured. This requires npx. ```sh npx create-expo --example with-pdf ``` -------------------------------- ### Create Expo App with S3 Example Source: https://github.com/expo/examples/blob/master/with-s3/README.md Use this command to initialize a new Expo project with the S3 upload example pre-configured. ```sh npx create-expo-app --example with-s3 ``` -------------------------------- ### Install Dependencies Source: https://github.com/expo/examples/blob/master/with-router-menus/README.md After creating the project, install the necessary dependencies using either yarn or npm. ```sh yarn npm install ``` -------------------------------- ### Create Expo App with OpenAI Example Source: https://github.com/expo/examples/blob/master/with-openai/README.md Use this command to create a new Expo project pre-configured with the OpenAI example. ```sh npx create-expo-app -e with-openai ``` -------------------------------- ### Create Expo App with Stripe Example Source: https://github.com/expo/examples/blob/master/with-stripe/README.md Use this command to quickly scaffold a new Expo project pre-configured with the Stripe example. ```bash npx create-expo -e with-stripe ``` -------------------------------- ### Start Expo App Source: https://github.com/expo/examples/blob/master/with-webgpu/README.md After bootstrapping, use this command to start the Expo application. Ensure you are using a custom client. ```sh npx expo run ``` -------------------------------- ### Start Live Activity Source: https://github.com/expo/examples/blob/master/with-widgets/README.md Initiate a Live Activity for delivery tracking. ```bash Tap **Start delivery Live Activity** to kick off a Live Activity that auto-advances Preparing → On the way → Delivered on the Lock Screen and Dynamic Island, with a live ETA countdown and a self-filling progress bar. ``` -------------------------------- ### Install Dependencies Source: https://github.com/expo/examples/blob/master/with-maestro/README.md Install project dependencies using yarn or npm. ```bash yarn install ``` ```bash npm install ``` -------------------------------- ### Start Convex Development Server Source: https://github.com/expo/examples/blob/master/with-convex/README.md Initializes the Convex development environment, prompts for authentication, and sets up backend functions. ```sh npx convex dev ``` -------------------------------- ### Create Expo App with React Flow Example Source: https://github.com/expo/examples/blob/master/with-react-flow/README.md Use this command to create a new Expo project pre-configured with the React Flow example. This sets up the necessary dependencies and project structure. ```sh npx create-expo-app -e with-react-flow ``` -------------------------------- ### Create Expo Yarn Workspaces Example Source: https://github.com/expo/examples/blob/master/with-yarn-workspaces/README.md Use this command to initialize a new Expo project with Yarn Workspaces support. ```bash npx create-expo --example with-yarn-workspaces ``` -------------------------------- ### Start Expo App Source: https://github.com/expo/examples/blob/master/with-clerk/README.md Run this command in your project directory to start the Expo development server. This allows you to preview your application on simulators or physical devices. ```sh npx expo ``` -------------------------------- ### Set up ESLint for Linting Source: https://github.com/expo/examples/blob/master/with-router-tv/README.md Run this command to set up ESLint for linting your project. Alternatively, follow the guide on Using ESLint and Prettier. ```bash npx expo lint ``` -------------------------------- ### Install Dependencies in Expo Project Source: https://github.com/expo/examples/blob/master/with-react-flow/README.md After cloning or creating the project, navigate to the project directory and run this command to install all required npm packages. ```sh cd your-project-name yarn ``` -------------------------------- ### Install Expo Project with Better Auth Source: https://github.com/expo/examples/blob/master/with-better-auth/README.md Use this command to create a new Expo project pre-configured with Better Auth. ```bash npx create-expo -e with-better-auth ``` -------------------------------- ### Bootstrap Project with Expo Source: https://github.com/expo/examples/blob/master/with-router-ai/README.md Use this command to create a new Expo project pre-configured with the AI chatbot example. ```sh npx create-expo-app -e with-router-ai ``` -------------------------------- ### Start Expo App with Template Source: https://github.com/expo/examples/blob/master/with-shadcn/README.md Initialize a new Expo app using the 'with-shadcn' template to begin development. This command sets up the project with Expo Router and shadcn pre-configured. ```bash npx create-expo-app -e with-shadcn ``` -------------------------------- ### Start Expo Development Server Source: https://github.com/expo/examples/blob/master/with-convex/README.md Launches the Expo development server to run the application on simulators or web. ```sh npx expo start ``` -------------------------------- ### Install Dependencies for Expo App Source: https://github.com/expo/examples/blob/master/with-convex/README.md Installs the necessary packages for the Expo project. ```sh npx expo install ``` -------------------------------- ### Install @expo/vector-icons Source: https://github.com/expo/examples/blob/master/with-icons/README.md Install the @expo/vector-icons package using expo install. This command ensures compatibility with your Expo project. ```sh expo install @expo/vector-icons ``` -------------------------------- ### Install Dependencies for Storybook with Expo Source: https://github.com/expo/examples/blob/master/with-storybook/README.md Install necessary dependencies to enable Storybook to work with Expo and React Native for web. ```bash npx expo add react-dom react-native-web @storybook/addon-react-native-web expo-pwa ``` -------------------------------- ### Start Next.js Web App Source: https://github.com/expo/examples/blob/master/with-nextjs/README.md Use `yarn next` to start the Next.js development server when targeting web. This replaces the standard `yarn expo` command for web builds. ```bash yarn next ``` -------------------------------- ### Create Expo App with Skia Source: https://github.com/expo/examples/blob/master/with-skia/README.md Use this command to initialize a new Expo project with Skia support. Ensure you have npx installed. ```sh npx create-expo-app -e with-skia ``` -------------------------------- ### Install React Router Dependencies Source: https://github.com/expo/examples/blob/master/with-react-router/README.md Install the necessary React Router packages for web and native platforms using either Yarn or npm. ```bash yarn add react-router-dom react-router-native ``` ```bash npm install --save react-router-dom react-router-native ``` -------------------------------- ### Start Expo App in Yarn Workspaces Source: https://github.com/expo/examples/blob/master/with-yarn-workspaces/README.md Execute this command to start the Expo application within the monorepo. This will typically launch the app on a simulator or device. ```bash yarn start-app ``` -------------------------------- ### Firebase Initialization and SAML Provider Setup Source: https://github.com/expo/examples/blob/master/with-firebase-saml-login/backend/firebase-wrapper-app.html Initializes the Firebase app with configuration and sets up a SAML authentication provider. Replace placeholder values with your actual Firebase configuration and provider ID. ```javascript const app = firebase.initializeApp({ // Add Firebase configuration here: https://firebase.google.com/docs/web/learn-more#config-object apiKey: "", authDomain: "", }); const provider = new firebase.auth.SAMLAuthProvider( "!!!!!PUT YOUR PROVIDER ID HERE!!!!!" ); ``` -------------------------------- ### Create Expo App with Template Source: https://github.com/expo/examples/blob/master/with-router-menus/README.md Use this command to create a new Expo project pre-configured with the with-router-menus template. Ensure you have npx installed. ```sh npx create-expo-app -e with-router-menus ``` -------------------------------- ### Add New shadcn Component Source: https://github.com/expo/examples/blob/master/with-shadcn/README.md Use the shadcn CLI to add new components to your project. Ensure you follow the official shadcn documentation for component installation. ```bash npx shadcn@latest add accordion ``` -------------------------------- ### Create Expo App with React Strict DOM Source: https://github.com/expo/examples/blob/master/with-react-strict-dom/README.md Use this command to create a new Expo project pre-configured with React Strict DOM. This is the recommended way to start. ```sh npx create-expo-app -e with-react-strict-dom ``` -------------------------------- ### Build and Test on EAS (iOS) Source: https://github.com/expo/examples/blob/master/with-maestro/README.md Start an EAS run to build and test the Expo app on iOS. ```bash eas build -e build-and-maestro-test -p ios ``` -------------------------------- ### Create Expo App with Router and Uniwind Source: https://github.com/expo/examples/blob/master/with-router-uniwind/README.md Use this command to quickly scaffold a new Expo project pre-configured with Expo Router and Uniwind. This is the recommended way to start. ```sh npx create-expo-app -e with-router-uniwind ``` -------------------------------- ### Configure Local Environment for Deployed API Source: https://github.com/expo/examples/blob/master/with-graphql/README.md Copy the example environment file and set the `EXPO_PUBLIC_API_URL` to the production URL of your deployed API. This allows your local project to communicate with the deployed backend. ```bash cp .env.example .env.local EXPO_PUBLIC_API_URL=https://your-chosen-name.expo.app ``` -------------------------------- ### Run Maestro Test on Expo Go (Android) Source: https://github.com/expo/examples/blob/master/with-maestro/README.md Start the Expo Go app on Android and then run a Maestro test flow for the home screen. ```bash yarn start # Then press 'a' to install and start Expo Go on Android ``` ```bash maestro test maestro/expo_go/home.yml ``` -------------------------------- ### Create Expo App with RSC Source: https://github.com/expo/examples/blob/master/with-rsc/README.md Use this command to create a new Expo app pre-configured with React Server Components. Ensure you have npx installed. ```bash npx create-expo-app -e with-rsc ``` -------------------------------- ### Bootstrap Expo App with Clerk Source: https://github.com/expo/examples/blob/master/with-clerk/README.md Use this command to create a new Expo app pre-configured with Clerk. Ensure you have npx installed. ```sh npx create-expo-app -e with-clerk ``` -------------------------------- ### Run Maestro Test on Expo Go (iOS) Source: https://github.com/expo/examples/blob/master/with-maestro/README.md Start the Expo Go app on iOS and then run a Maestro test flow for the expanding component. ```bash yarn start # Then press 'i' to install and start Expo Go on iOS ``` ```bash maestro test maestro/expo_go/expand_test.yml ``` -------------------------------- ### File Structure Example for Expo Gatsby Source: https://github.com/expo/examples/blob/master/contributing.md Illustrates a typical file structure for an Expo project using Gatsby. This includes directories for source code, generated files, assets, and configuration files like `app.config.js` and `gatsby-config.js`. ```tree Expo Gatsby ├── src │ └── pages ➡️ Routes │ └── index.tsx ➡️ Entry Point for Gatsby ├── .cache ➡️ Generated Gatsby files (should be ignored) ├── public ➡️ Generated Gatsby files (should be ignored) ├── assets ➡️ All static assets for your project ├── App.tsx ➡️ Entry Point for Mobile apps ├── app.config.js ➡️ Expo config file ├── gatsby-config.js ➡️ Gatsby config file └── babel.config.js ➡️ Babel config (should be using `babel-preset-expo`) ``` -------------------------------- ### Build and Test on EAS (Android) Source: https://github.com/expo/examples/blob/master/with-maestro/README.md Start an EAS run to build and test the Expo app on Android. Ensure to follow the prerequisite instructions for disabling the new Android builds infrastructure. ```bash eas build -e build-and-maestro-test -p android ``` -------------------------------- ### Root package.json for Yarn Workspaces Source: https://github.com/expo/examples/blob/master/with-yarn-workspaces/README.md The root `package.json` defines Yarn commands to manage the monorepo and run the Expo app. It typically includes scripts for building, watching, and starting the application. ```json { "name": "with-yarn-workspaces", "version": "1.0.0", "private": true, "scripts": { "watch-packages": "yarn workspaces focus --production --exclude expo-custom && yarn --cwd packages/expo-custom watch", "start-app": "yarn workspace @example/mobile start" }, "workspaces": [ "apps/*", "packages/*" ], "devDependencies": { "@babel/core": "^7.17.9", "@babel/preset-env": "^7.17.10", "@babel/preset-typescript": "^7.17.12", "expo-module-scripts": "^3.0.10", "react-native-babel-preset": "^0.70.0", "typescript": "4.7.4" } } ``` -------------------------------- ### Disable TypeScript Setup in Expo CLI Source: https://github.com/expo/examples/blob/master/with-typescript/README.md To prevent Expo CLI from automatically configuring TypeScript during project setup, set the EXPO_NO_TYPESCRIPT_SETUP environment variable before starting the development server. ```bash EXPO_NO_TYPESCRIPT_SETUP=1 expo start ``` -------------------------------- ### Build for iOS and Android with EAS CLI Source: https://github.com/expo/examples/blob/master/with-clerk/README.md Build native applications for iOS and Android using the EAS CLI. This command triggers the build process on Expo Application Services, generating installable app binaries. ```sh npx eas-cli build ``` -------------------------------- ### Generate Prisma Client Source: https://github.com/expo/examples/blob/master/with-better-auth/README.md Run this command after setting up the project to generate the Prisma client, which is necessary for database interactions. ```bash npx prisma generate ``` -------------------------------- ### Run iOS App Source: https://github.com/expo/examples/blob/master/with-widgets/README.md Build and open the app on an iOS simulator or device. ```bash yarn ios npm run ios ``` -------------------------------- ### Bootstrap Expo Project with WebGPU Source: https://github.com/expo/examples/blob/master/with-webgpu/README.md Use this command to create a new Expo project pre-configured with WebGPU support. This project requires a custom client to run. ```sh npx create-expo-app -e with-webgpu ``` -------------------------------- ### Build and Run for TV Development Source: https://github.com/expo/examples/blob/master/with-tv/README.md Use these commands to set up and run the project for TV targets (Apple TV and Android TV). Ensure you run `yarn prebuild:tv` before building for TV. ```sh yarn yarn prebuild:tv yarn ios yarn android yarn web ``` -------------------------------- ### Run Prisma Database Migrations Source: https://github.com/expo/examples/blob/master/with-better-auth/README.md After generating the schema, use this command to apply the migrations and set up your local SQLite database. ```bash npx prisma migrate dev ``` -------------------------------- ### Run Project Locally Source: https://github.com/expo/examples/blob/master/with-router-menus/README.md Build and run the project on iOS or Android simulators/devices, or open it in a web browser. ```sh npx expo run:ios npx expo run:android npx expo --web ``` -------------------------------- ### Import Sample Data into Convex Products Table Source: https://github.com/expo/examples/blob/master/with-convex/README.md Imports sample product data from a JSONL file into the 'products' table in your Convex database. ```sh npx convex import --table products sampleData.jsonl ``` -------------------------------- ### Serve Production Build Locally Source: https://github.com/expo/examples/blob/master/with-workbox/README.md Host the generated `/web-build` folder locally using `yarn serve` to test the service worker. ```bash yarn serve ``` -------------------------------- ### Cookie Utility Functions Source: https://github.com/expo/examples/blob/master/with-firebase-saml-login/backend/firebase-wrapper-app.html Provides functions to set and get cookies with expiration times. Useful for managing session state or tracking redirects. ```javascript function setCookie(cName, cValue, expMinutes) { let date = new Date(); date.setTime(date.getTime() + expMinutes * 60 * 1000); const expires = "expires=" + date.toUTCString(); document.cookie = cName + "=" + cValue + "; " + expires + "; path=/"; } function getCookie(cName) { const name = cName + "="; const cDecoded = decodeURIComponent(document.cookie); //to be careful const cArr = cDecoded.split("; "); let res; cArr.forEach((val) => { if (val.indexOf(name) === 0) res = val.substring(name.length); }); return res; } ``` -------------------------------- ### Run Maestro Test on Development Build (Home Screen) Source: https://github.com/expo/examples/blob/master/with-maestro/README.md Execute a Maestro test flow for the home screen on a locally built development version of the app. ```bash maestro test maestro/dev_build/home.yml ``` -------------------------------- ### Build and Run for Mobile Development Source: https://github.com/expo/examples/blob/master/with-tv/README.md Use these commands to set up and run the project for mobile targets (iOS and Android). Ensure you run `yarn prebuild` before building for mobile. ```sh yarn yarn prebuild yarn ios yarn android yarn web ``` -------------------------------- ### Create New Expo Project with TypeScript Source: https://github.com/expo/examples/blob/master/with-typescript/README.md Use this command to quickly scaffold a new Expo project pre-configured with TypeScript. Navigate into the created directory to begin development. ```bash npx create-expo --example with-typescript ``` -------------------------------- ### Create Expo Project with Workbox Source: https://github.com/expo/examples/blob/master/with-workbox/README.md Use this command to create a new Expo project pre-configured with Workbox. ```bash npx create-expo --example with-workbox ``` -------------------------------- ### Reset Expo Project to Starter Code Source: https://github.com/expo/examples/blob/master/with-router-tv/README.md This command resets the project to its starter code, moving the current starter code to the app-example directory and creating a blank app directory for new development. ```bash npm run reset-project ``` -------------------------------- ### Create and Configure Expo Project for TV Source: https://github.com/expo/examples/blob/master/with-router-tv/README.md Use this command to create a new Expo project with the with-router-tv template. After navigating into the project, run these commands to set up for TV development. ```sh npx create-expo-app -e with-router-tv cd your-project-name yarn yarn prebuild:tv yarn ios yarn android ``` -------------------------------- ### Build Expo Web App for Production Source: https://github.com/expo/examples/blob/master/with-workbox/README.md Build your Expo web application for production to enable service workers. ```bash expo build:web ``` -------------------------------- ### Create and Configure Expo Project for Mobile Source: https://github.com/expo/examples/blob/master/with-router-tv/README.md Use this command to create a new Expo project with the with-router-tv template. After navigating into the project, run these commands to set up for mobile development. ```sh npx create-expo-app -e with-router-tv cd your-project-name yarn yarn prebuild yarn ios yarn android ``` -------------------------------- ### Add TypeScript to Existing Expo Project Source: https://github.com/expo/examples/blob/master/with-typescript/README.md Manually add TypeScript to an existing Expo project by creating a tsconfig.json file and running the start script. Rename your files to .ts or .tsx accordingly. ```bash touch tsconfig.json ``` ```bash yarn start # or npm run start ``` -------------------------------- ### Create Expo App with React Navigation Template Source: https://github.com/expo/examples/blob/master/with-react-navigation/README.md Use this command to create a new Expo project initialized with the React Navigation template. Available for npx, yarn, pnpm, and bun. ```sh npx create-expo-app --example with-react-navigation ``` ```sh yarn create expo-app --example with-react-navigation ``` ```sh pnpm create expo-app --example with-react-navigation ``` ```sh bun create expo-app --example with-react-navigation ``` -------------------------------- ### Initialize EAS Project Source: https://github.com/expo/examples/blob/master/with-maestro/README.md Initialize the Expo application as an EAS project. ```bash eas init ``` -------------------------------- ### Create Expo App with Convex Template Source: https://github.com/expo/examples/blob/master/with-convex/README.md Use this command to create a new Expo project pre-configured with Convex. ```sh npx create-expo-app --example with-convex ``` ```sh yarn create expo-app --example with-convex ``` ```sh pnpm create expo-app --example with-convex ``` ```sh bun create expo-app --example with-convex ``` -------------------------------- ### Configure S3 Bucket CORS Policy Source: https://github.com/expo/examples/blob/master/with-s3/README.md This JSON configuration enables Cross-Origin Resource Sharing (CORS) for your S3 bucket, allowing web uploads and access. It permits GET, PUT, POST, and DELETE methods from any origin. ```json [ { "AllowedHeaders": ["*"], "AllowedMethods": ["GET", "PUT", "POST", "DELETE"], "AllowedOrigins": ["*"], "ExposeHeaders": [] } ] ``` -------------------------------- ### Run Maestro Test on Development Build (Expand Component) Source: https://github.com/expo/examples/blob/master/with-maestro/README.md Execute a Maestro test flow for the expanding component on a locally built development version of the app. ```bash maestro test maestro/dev_build/expand_test.yml ``` -------------------------------- ### Build and Watch Packages in Yarn Workspaces Source: https://github.com/expo/examples/blob/master/with-yarn-workspaces/README.md Run this command to build your packages and enable watching for changes, which is essential for live-reloading during development. ```bash yarn watch-packages ``` -------------------------------- ### Add Expo Launch Badge to README Source: https://github.com/expo/examples/blob/master/README.md Include this Markdown snippet in your project's README to add a badge that enables single-click deployment to Expo. Replace `<GH_REPO_URL>` with your repository's URL. ```markdown [![Launch with Expo](https://github.com/expo/examples/blob/master/.gh-assets/launch.svg?raw=true)](https://launch.expo.dev/?github=<GH_REPO_URL>) ``` -------------------------------- ### Deploy to Now.sh Source: https://github.com/expo/examples/blob/master/with-formdata-image-upload/backend/README.md Execute this command to deploy the project to Now.sh. It sets the necessary AWS environment variables from the secrets you previously added and configures the production environment. ```bash now . \ -e AWS_ACCESS_KEY_ID=@aws-access-key-id \ -e AWS_SECRET_ACCESS_KEY=@aws-secret-access-key \ -e AWS_BUCKET=@aws-bucket \ -e NODE_ENV=production ``` -------------------------------- ### Export Full-Stack Web Bundle Source: https://github.com/expo/examples/blob/master/with-graphql/README.md Export a web bundle that includes both the API and the web UI. This is for deploying the complete application. ```bash npx expo export --platform web ``` -------------------------------- ### Enable Parallel Deployments Source: https://github.com/expo/examples/blob/master/with-router-ai/README.md Set this environment variable to enable parallel deployments to the server, required for launching the application. ```sh EXPO_UNSTABLE_DEPLOY_SERVER=1 ``` -------------------------------- ### Run Expo Project on Web Source: https://github.com/expo/examples/blob/master/with-router-tv/README.md This command runs the Expo project on the web from localhost. ```sh yarn web ``` -------------------------------- ### Configure Clerk Environment Variables Source: https://github.com/expo/examples/blob/master/with-clerk/README.md Add your Clerk publishable and secret keys to the .env file to enable Clerk authentication. These keys are essential for connecting your app to Clerk services. ```sh EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=... CLERK_SECRET_KEY=... ``` -------------------------------- ### Update Widget from App Source: https://github.com/expo/examples/blob/master/with-widgets/README.md Tap the button in the app to update the widget. ```bash Tap **Increment and update widget** in the app and watch the widget update. ``` -------------------------------- ### Build Development Builds for iOS and Android Source: https://github.com/expo/examples/blob/master/with-react-navigation/README.md Commands to build and run development versions of your app on iOS and Android simulators or devices. ```sh npm run ios ``` ```sh npm run android ``` -------------------------------- ### Create Expo App with Tailwind CSS Source: https://github.com/expo/examples/blob/master/with-tailwindcss/README.md Use this command to create a new Expo project pre-configured with Expo Router and Nativewind. ```sh npx create-expo-app -e with-tailwindcss ``` -------------------------------- ### Build Development Build (Android) Source: https://github.com/expo/examples/blob/master/with-maestro/README.md Build the development version of the Expo app for Android. ```bash yarn android ``` -------------------------------- ### Deploy Project to EAS Hosting Source: https://github.com/expo/examples/blob/master/with-s3/README.md Deploys your Expo project to EAS Hosting. Use `--environment production` to utilize uploaded environment variables; omit it to use local `.env` files. The `--prod` flag promotes the deployment to production. ```sh npx eas-cli deploy --environment production --prod ``` -------------------------------- ### Deploy Website with EAS CLI Source: https://github.com/expo/examples/blob/master/with-clerk/README.md Use the EAS CLI to deploy your Expo application as a website. This command initiates the deployment process to Expo Application Services. ```sh npx eas-cli deploy ``` -------------------------------- ### Configure OpenAI API Key Source: https://github.com/expo/examples/blob/master/with-router-ai/README.md Add your OpenAI API key to the .env file to enable AI functionality. Ensure the key is kept secret. ```sh OPENAI_API_KEY=sk-proj-... ``` -------------------------------- ### Create Expo App with Router Source: https://github.com/expo/examples/blob/master/with-router/README.md Use this command to create a new Expo application pre-configured with Expo Router. ```sh npx create-expo-app -e with-router ``` -------------------------------- ### Generate Native Projects with Expo Prebuild Source: https://github.com/expo/examples/blob/master/with-moti/README.md To work with native iOS and Android projects, use the `npx expo prebuild` command. This generates native project files from your `app.json` or `app.config.js` configuration. ```bash npx expo prebuild ``` -------------------------------- ### Set GitHub Token Environment Variable Source: https://github.com/expo/examples/blob/master/with-github-remote-build-cache-provider/README.md Set your GitHub Personal Access Token as an environment variable. Ensure the token has 'repo' permissions. ```bash export GITHUB_TOKEN=YOUR_TOKEN_HERE ``` -------------------------------- ### Build Development Build (iOS) Source: https://github.com/expo/examples/blob/master/with-maestro/README.md Build the development version of the Expo app for iOS. ```bash yarn ios ``` -------------------------------- ### Delivery Live Activity UI Source: https://github.com/expo/examples/blob/master/with-widgets/README.md The delivery Live Activity UI uses createLiveActivity to render Lock Screen and Dynamic Island presentations. ```typescript import { LiveActivity } from '@expo/widgets'; export default function DeliveryActivity() { return ( <LiveActivity title="Delivery" subtitle="Your order" state={{ status: 'Preparing', eta: '10:00', progress: 0.2, }}> {/* Content for Lock Screen and Dynamic Island */} </LiveActivity> ); } // ... other imports ``` -------------------------------- ### Sync GraphQL Schema Source: https://github.com/expo/examples/blob/master/with-graphql/README.md After modifying the GraphQL schema in `src/app/api/graphql+api.ts`, run this command to refetch the schema. The API must be running for this script to succeed. ```bash npm run sync:schema ``` -------------------------------- ### Deploy API to EAS Hosting Source: https://github.com/expo/examples/blob/master/with-graphql/README.md Deploy the exported API bundle to EAS Hosting. This will provide a production URL for your GraphQL endpoint. ```bash npx eas-cli deploy --prod ``` -------------------------------- ### Generate Better Auth Database Schema Source: https://github.com/expo/examples/blob/master/with-better-auth/README.md This command updates your schema.prisma file with the necessary tables for Better Auth. It should be run before Prisma's generate and migrate commands. ```bash npx @better-auth/cli generate ``` -------------------------------- ### Export API Only Bundle Source: https://github.com/expo/examples/blob/master/with-graphql/README.md Export a web bundle for the API only, without static site generation, for deployment. This is useful for using the API in local mobile apps. ```bash npx expo export --platform web --no-ssg ``` -------------------------------- ### Expo App Entry Point Source: https://github.com/expo/examples/blob/master/with-yarn-workspaces/README.md This is the main entry point for the Expo application. It imports and renders the custom message from the separate package. ```javascript import { Text, View } from "react-native"; import { message } from "expo-custom"; export default function App() { return ( <View> <Text>{message}</Text> </View> ); } ``` -------------------------------- ### Update Live Activity Snapshot Source: https://github.com/expo/examples/blob/master/with-widgets/README.md The app pushes a snapshot to the Live Activity when the delivery stage changes. ```typescript import { startLiveActivity } from 'expo-live-activity'; async function startDelivery() { await startLiveActivity('DeliveryActivity', { status: 'On the way', eta: '05:00', progress: 0.6, }); } // ... other imports and functions ```