Resolving the “xcrun: unable to find simctl” Error in Xcode

Resolving the "xcrun: unable to find simctl" Error in Xcode

28 February 2025 Stephan Petzl Leave a comment Xcode

Encountering the “xcrun: error: unable to find utility ‘simctl’, not a developer tool or in PATH” error can be frustrating for developers using Xcode. This error typically arises when the path to the command line tools is not properly configured, especially after updates or installations of new Xcode versions. Below, we provide a step-by-step guide to resolve this issue effectively.

Solution 1: Set Command Line Tools in Xcode Preferences

The most common and effective solution involves setting the Command Line Tools correctly in Xcode. Follow these steps:

  • Open Xcode.
  • Navigate to Xcode > Preferences.
  • Select the Locations tab.
  • In the Command Line Tools dropdown, select your current version of Xcode.

This solution has been successful for many users and is often the first step to try when encountering this error.

Solution 2: Use Terminal Commands

If the above method does not resolve the issue, you can attempt the following terminal commands:

  • Open Terminal.
  • Execute the command: sudo xcode-select -s /Applications/Xcode.app
  • If prompted, agree to the license by running: sudo xcodebuild -license

These commands help ensure that the correct path to the Xcode app is set and that the necessary licenses are accepted.

Solution 3: Adjust SDK Path

For some users, the problem may stem from an incorrect SDK path. You can adjust this by:

  • Editing your .zshrc file (or the appropriate shell configuration file).
  • Adding the line: export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
  • Restarting your terminal to apply changes.

Conclusion

By following these solutions, you should be able to resolve the “xcrun: unable to find simctl” error efficiently. It’s crucial to ensure that your Xcode preferences are correctly set and that any terminal commands are executed with the right permissions.

For developers looking to streamline their testing processes, consider using Repeato, a no-code test automation tool. Repeato facilitates the creation, execution, and maintenance of automated tests for iOS, Android, and web apps. Unlike traditional tools, Repeato’s reliance on computer vision and AI allows for quick test recording and editing, making it a practical solution to enhance your development workflow.

Like this article? there’s more where that came from!