These instructions are for wranglers who wish to set up their MacBooks for running iOS and/or Android simulators with Expo Go and/or Expo Development Builds.
You'll need to create an Expo account at https://expo.dev and be granted access to any particular Expo/RN projects you want to run.
-
Install Xcode via the AppStore
-
Once completed, open Xcode. It will likely install more components.
-
Open a Terminal, you will be pasting a series of commands (below) into this terminal. You should wait for each command to complete before continuing. You'll know it's complete once you see the cursor again.
-
Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
This command will prompt for a password. Enter the password of your current mac user. After installation Brew will likely ask you to run a couple of commands to add Brew to your path.
- Install
n
brew install n
- Install node 16
sudo n 16
- Install git
brew install git
- Clone this repository somewhere appropriate, if you're not sure where just use your home directory
cd ~
git clone https://github.com/mondo-mob/wrangler-sim-expo-setup.git
- Change directory into the repository that was cloned in the last step above. For example:
cd ~/wrangler-sim-expo-setup
- Install NPM modules
npm i
- Login to Expo
npx expo login
- Configure XCode
- Open Xcode and click on the Xcode --> Preferences menu
- Click the
Locations
tab - If no
Command Line Tools
open is selected, click on the select dropdown to select one (there should be a single item in there to select)
- Install Android Studio
brew install --cask android-studio
- ... SDK setup, emulator installation etc ....
Only use this section if the target project is compatible with Expo Go.
This will install Expo Go onto a simulator/emulator. Once installed you can open your project specific url.
- Start Expo
npm run start:expo-go
-
Press
i
to open an iOS simulator and install Expo Go on it -
Expo Go should be installed onto the simulator now. Open the simulator and paste your Expo project link into Safari, which should open your app.
You can switch devices using the Simulators
menu.
-
Start desired emulator from Android Studio
-
Download Expo Go apk file from https://expo.dev/tools
-
Drag apk file onto running simulator to install.
Only use this section if the target project is using development builds.
iOS Simulators require a specific simulator build to be created. This must already be made created by the development team before running the steps below.
-
Configure application
- Within
wrangler-sim-expo-setup
project download in previous steps, open theapp.json
file in your editor of choice - Change the
owner
andslug
properties to match those of the desired Expo project. You can find these on the Project Overview in the Expo Console.
- Within
-
Install simulator build
npx eas-cli build:run -p ios
-
If prompted to login, then login with your Expo credentials
-
If prompted
Existing EAS project found... Configure this project?
Chooseyes
. -
A list of available builds should be shown. Select the build you wish to install (usually the latest one)
-
If prompted to select an emulator, choose the simulator you wish to install onto
-
Once installed you can open the development build application on the simulator and then open the desired project url via the "Enter URL manually" option.
These steps can be repeated to install newer builds or to install onto other simulators.
-
Start desired emulator from Android Studio
-
Download desired Development build apk from Expo console.
-
Drag apk file onto running simulator to install.
These steps can be repeated to install newer builds or to install onto other emulators.
- Download and install the required build apk from Expo Console