This README provides a step-by-step guide to setting up and running an Expo React Native app using Expo Go.
Before you start, please ensure that you have the following installed on your machine:
- Node.js - Install the LTS version (recommended) or the latest version.
- Expo CLI - Install the Expo CLI globally by running
npm install -g expo-cli
. - Xcode - Install Xcode to run the app on an iOS simulator (macOS only). You may also use Android Studio to run the app on an Android emulator.
- Clone the repository to your local machine using
git clone <repository-url>
. - Navigate to the project directory using
cd <project-directory>
. - Install the project dependencies by running
npm install
oryarn install
(if you have Yarn installed).
To run the Expo React Native app using Expo Go, follow these steps:
- Start the development server by running
expo start
. This will open the Expo Dev Tools in your terminal. - To run the app on an iOS simulator (macOS only), press
i
in the terminal window. This will open the app in the iOS simulator. If you don't have the required simulator installed, Xcode will prompt you to download and install it. - To run the app on an Android emulator, press
a
in the terminal window. This will open the app in the Android emulator. Make sure you have the emulator running before pressinga
.
To run the app on a physical device, follow these steps:
- Install the Expo Go app on your iOS or Android device.
- Ensure that your device and development machine are on the same network.
- Open the Expo Go app on your device and scan the QR code displayed in the Expo Dev Tools in your browser or terminal window.
- The app should now load on your device. As you make changes to the app's code, the app will automatically reload to display the latest changes.
If you encounter any issues while running the app, try the following:
- Ensure that you have the latest version of Expo CLI installed.
- Delete the
node_modules
folder and reinstall the dependencies by runningnpm install
oryarn install
. - Reset the cache by running
expo start --clear
.
For more information, refer to the Expo documentation.