I’ve been having hard times with my old Windows laptop while developing React Native apps so I moved to MacOS laptop. I installed Android Studio and Xcode (including Xcode command line tools). Then I initialized a blank expo managed project. I started both on Android Emulator and iOS simulator. Android one worked out with an ádb´ error (or maybe warning). But on the other hand, iOS simulator did nothing. There’s no Expo Go app installed on iOS device, so it can not launch my app using it. I don’t get any error or warning related to this problem, so I can’t trace the problem.
- I have tried deleting global expo folder located at ´~/.expo/´, I also tried to give 777 (all permissions) on that folder to my current user.
- I tried uninstalling and reinstalling expo package globally.
- I made sure I have selected Xcode command line tools on ´Xcode -> Preferences -> Locations -> Xcode 13.2.1 (13C100)´
- I tried to launch different iOS devices like (iPhone 6, 8, 13, iPod etc.)
- I tried clearing cache and starting expo with ´sudo npm start –clear-cache´
I have been trying to solve this for at least 2 hours tried everything possibly related to my problem but none of them did work. There’s one thing I don’t understand though. Even though I used different iOS device simulators the Expo Metro Bundler showed this ´› Opening exp://10.42.33.15:19000 on iPhone 8´ output. I have tried iPhone 13, iPhone 6, iPod etc. but this was the same output for different devices. Here’s some screenshot related to probem:
4
Answers
https://www.youtube.com/watch?v=dvuZn6gX_Q4
This tutorial video on YouTube helped me solve my problems. I think I was missing a few things:
System Preferences > Security & Privacy > Go Privacy Tab > Give Full Disk Access to Xcode, VS Code, Android Studio, Terminal and Watchman
(Watchman is not required, but I have also installed it for solving a problem before)open -a simulator
.expo client:install:ios
command.expo start
command. Typei
anda
or click onRun on iOS simulator
andRun on Android device/emulator
buttons to launch your app on devices.NOTE: If you app gets stuck at
New update available, downloading...
stage then you can start your expo app with cleaned cache usingexpo start -c
command. It was helpful for me.NOTE 2: You may need to use
sudo
command on some of the commands I've mentioned, I'm not sure which ones are required or not.I run into the same issue every time when I tried to set it up on a new laptop.
Its fixed after the installation of xCode cli.
Take a look at this – https://docs.expo.dev/workflow/ios-simulator/
I fixed similar issue by hard restarting simulator
Top menu -> Device -> Erase All Content And Settings…
You can now install the Expo Go client on the simulator via:
npx expo client:install:[ios|android]
https://docs.expo.dev/archive/expo-cli/