Expo React-Native iOS Simulator not working

北战南征 提交于 2019-11-30 06:21:44

I had the same problem, fixed it by manually starting the simulator app before starting expo.

The app is located in /Applications/Xcode.app/Contents/Developper/Applications/Simulator.app

According to this thread What does com.apple.CoreSimulator.CoreSimulatorService do?, you can just execute the launch correctly the simulator.

killall -9 com.apple.CoreSimulator.CoreSimulatorService

Actually, it works to launch the simulator, but if I restart once the simulator, the problem is still here.

Update:

Apple provided a patch 10.2.1. After an update of XCode through the App Store, it seems working better. My simulator boots with an error, but after press "i" again in the terminal, it works correctly even if I restart the process.

Don't forget to update the latest version of expo-cli with npm install -g expo-cli

Yes you can fixed it temporarily by starting the simulator app before starting expo : open -a Simulator; expo start

But the next time you open it, you have to run both commands again as well. For now, you can aliasing start to open -a Simulator; expo start

Simplest solution I have found; change your npm start script within the package.json file of your Expo project:

"start": "expo start", > "start": "open -a Simulator && expo start",

Manually opening the simulator first can help:

open -a Simulator

Then if using expo:

expo start 

Finally click:

"Run on iOS simulator"

Yup, additionally you have to give permissions every time you relaunch.. and because these are alerts.. the simulator takes forever to render. This is not an acceptable workflow. For now im just rendering on a device. Really hoping this gets fixed proper and soon.

If it helps anyone else, the fix of opening the Simulator first was not working for me at first because I did not have command line tools installed. You can open xCode, go to preferences > locations > command line tools and if that is empty you'll need to install them. Once they are installed, expo start will give the same error as OP, but you can then use the open -a Simulator && expo start suggestion.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!