Search code examples
javascriptiosxcodemacos

Xcode build system crashes with "unexpected service error" on iPhone 16 simulator


I am encountering an issue when running my React Native project on the iPhone 16 simulator. The error message I receive is:

unexpected service error: The Xcode build system has crashed. Build again to continue.

Steps I’ve taken to troubleshoot:

  1. Cleaned the build folder (Shift + Cmd + K).

  2. Restarted Xcode and the simulator.

  3. Deleted the Derived Data folder.

  4. Rebooted my machine.

  5. Checked for Xcode updates — I'm using the latest version.

  6. Set the build system to "New Build System (Default)" in Xcode preferences.

Despite trying all of these steps, the issue persists.

Has anyone else encountered this problem, and are there any other solutions or suggestions for fixing this build system crash?

System details:

  • Xcode version: 16.0

  • macOS version: 15.0

  • React Native version: 0.72.4

Any help would be greatly appreciated!


Solution

  • If your project is a React Native project here is the fix https://stackoverflow.com/a/78995681/15757842 In my case, I ran

    npx react-native run-ios

    but it loops forever so after a time I kill the XCBBuildService process using the activity monitor on the terminal to verify what makes your app build fail if you see this

    node_modules/react-native-image-crop-picker/ios/src/ImageCropPicker.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

    the problem is solved with the answer mentioned here https://stackoverflow.com/a/78995681/15757842