# Cannot Detect iOS Simulators

If your Finalrun application is unable to detect or list iOS simulators, this guide will help you resolve the underlying issue.

To quickly check why Finalrun is not detecting simulators, open your Terminal.app and run the following command:

```bash
xcrun simctl list devices
```

* If this command successfully returns a list of simulators, the issue might be specific to Finalrun (please contact our support team).
* If this command fails with an error like `xcrun: error: unable to find utility "simctl"`, it indicates that the necessary Xcode Command Line Tools are missing or misconfigured on your system. This is the most common reason Finalrun cannot find simulators......

Follow the steps below to fix this configuration.

**Step 1: Verify Xcode Installation & Path**

Ensure Xcode is installed and its developer directory is properly recognized by your system.

```bash
xcode-select -p
```

* **Expected:** A path like `/Applications/Xcode.app/Contents/Developer` (or similar valid path).
* **Action if Missing/Incorrect:** If no path is returned or it's invalid, install Xcode from the Mac App Store. Launch Xcode at least once to complete its initial setup.

**Step 2: Install/Reinstall Command Line Tools (CLT)**

Install or refresh the necessary command-line tools that include `simctl`.

```bash
xcode-select --install
```

* **Expected:** A software update pop-up will appear, asking you to install. Click "Install".
* **Note:** If it says tools are "already installed," you can proceed directly to Step 3.

**Step 3: Point to the Correct Developer Directory**

Ensure your system is explicitly using the correct Xcode developer directory. This helps resolve path conflicts.

```bash
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
```

* **Important:** If your Xcode is installed in a non-standard location, replace `/Applications/Xcode.app/Contents/Developer` with the actual path to your Xcode's `Contents/Developer` folder.

**Step 4: Verify Simulator Detection (System-Wide)**

Confirm that `simctl` is now accessible and can list simulators on your system.

1. **Crucial:** Close and reopen your **Terminal.app** (and any IDEs or other development tools you might have open).
2. Run:

   ```bash
   xcrun simctl list devices
   ```

   * **Expected:** You should now see a detailed list of available iOS simulators. This confirms your system can properly interact with simulators.

***

**Final Step: Verify Finalrun App Functionality**

1. **Quit and Relaunch** the Finalrun application completely.
2. Check the simulator selection area within Finalrun. You should now see the list of available iOS simulators.

If issues persist, please contact <support@finalrun.app> with details of your macOS/Xcode versions and any output from the `xcrun simctl list devices` command.
