Skip to content

Instantly share code, notes, and snippets.

@kirti-swiggy
Last active February 7, 2025 13:51
Show Gist options
  • Save kirti-swiggy/0d711f4e6e598ca15878d32b99ee27c8 to your computer and use it in GitHub Desktop.
Save kirti-swiggy/0d711f4e6e598ca15878d32b99ee27c8 to your computer and use it in GitHub Desktop.
Fix for Xcode 14 getting stuck while rebuilding on macOS Ventura (13)
#!/bin/sh
killall "Simulator" || true
exit;

The Problem

The latest addition to Xcode's long list of bugs is the problem of Simulator screen going black and getting stuck. We need to manually kill the simulator and rebuild the project. This gets really frustrating if your project has significant build time.

The Workaround

You may follow following steps as a workaround till Apple fixes the issue in upcoming Xcode releases.

  1. Download the above script file.
  2. Give the script file execute permission. You can either use Finder or run chmod +x <path-of-the-script> from the terminal to make it an executable file.
  3. Go to Xcode -> Behaviours -> Edit behaviours.
  4. Go to Starts under the Build section. Scroll down to Run option. Enable it and choose the downloaded script path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment