Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native `RuntimeError: abort(Error: xcrun exited with non-zero code: 2` on iOS simulator

I was working on a React Native project with a group and was asked to use the iPhone 13 simulator as a model while working. I only had access to the iPhone 12 simulator, and I saw that my XCode was a version behind, so I updated it. Now with the new XCode, I am getting an error when I start the React Native server and try and open the iOS simulator. the error is shown below:

error code in console

Running this command with the suggested build with -s Assertions=1 reveals the following:

result of build command with flag

My package.json is as following:

packagejson file

Any idea what is going on or how to proceed? Expo seems to be able to run, but trying to open the simulator crashes the server. The project I am on is near tight deadlines and I am totally held up by this. Either a way to troubleshoot this error or a way to roll back my XCode install and just live with a dated simulator would be greatly appreciated.

like image 648
Callum Reid Avatar asked Sep 03 '25 15:09

Callum Reid


1 Answers

Figured it our thanks to ShepSims from https://github.com/expo/expo-cli/issues/2413 . Before being able to open the iOS simulator from the terminal, I needed to open XCode and open the simulator there. This mounts the simulator bundle, allowing later access by pressing i after running expo start.

like image 147
Callum Reid Avatar answered Sep 05 '25 15:09

Callum Reid