M. Çağlar TUFAN
M. Çağlar TUFAN

Reputation: 910

React Native Expo Managed App doesn't launch/start on iOS simulator

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 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:

Screenshot

Upvotes: 6

Views: 24777

Answers (7)

Swornim Shah
Swornim Shah

Reputation: 69

For the new architecture enabled , sdk >= 51 npx expo start --ios

Upvotes: 0

Andres9619
Andres9619

Reputation: 194

This happened to me because I haven't installed iOS in XCode, after installing everything ok

Upvotes: 1

Jeremy
Jeremy

Reputation: 1

I tried the above answers without success and after some research I noticed that MacBooks with M1/M2 (if you are concerned) are not yet compatible with Expo Go. So I installed Rosetta and that solved the problem, Expo Go on iOS simulator works now.

To install Rosetta (which is not an application), you must launch a software for intel chip on your Mac (vlc for example) and a popup will ask you if you want to install Rosetta.

Upvotes: 0

Freewalker
Freewalker

Reputation: 7305

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/

Upvotes: 0

Aliaksei Litsvin
Aliaksei Litsvin

Reputation: 1261

I fixed similar issue by hard restarting simulator

Top menu -> Device -> Erase All Content And Settings...

Upvotes: 3

Eric Hu
Eric Hu

Reputation: 11

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/

Upvotes: 1

M. Çağlar TUFAN
M. Çağlar TUFAN

Reputation: 910

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:

  1. I haven't granted required privacy permissions on my Mac for Xcode, Android Studio and VS Code. Open 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)
  2. You should to launch both your Android and iOS simulators before starting your expo application. Simply go to Android Studio and launch your device. To launch iOS device use bash and type open -a simulator.
  3. If you don't have Expo Go app installed on your iOS simulator then you should first install it before starting your expo app. To install it use expo client:install:ios command.
  4. Start your app by using expo start command. Type i and a or click on Run on iOS simulator and Run 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 using expo 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.

Upvotes: 8

Related Questions