Fix: ‘No connected devices’ When Flutter Won’t See the iOS Simulator

Fix: 'No connected devices' When Flutter Won't See the iOS Simulator

Written by

in

Quick answer: Flutter only lists simulators that are already booted and devices that are physically connected, so an installed-but-closed iOS Simulator is invisible to flutter run. Open Simulator.app (or run flutter emulators --launch apple_ios_simulator), confirm with flutter devices, then run flutter run -d <device-id>. If nothing appears, check that xcode-select -p points at Xcode.app and that a simulator runtime is installed.

Why this happens

flutter run does not scan your disk for simulators. It asks the platform tooling for a list of usable targets: booted iOS simulators, running macOS/desktop targets, and physically attached devices. A simulator that exists in Xcode but is not running is not a target, so Flutter reports No connected devices. even though everything is installed correctly.

The same message shows up in flutter doctor as:

[!] Connected devices
    ! No devices available

That line is a symptom, not a separate failure. It means the device discovery step returned an empty list — either because nothing is booted, or because Flutter could not talk to the Xcode toolchain at all.

The second, less obvious cause is a broken toolchain path. Flutter shells out to xcrun simctl to enumerate simulators. If xcode-select -p points at /Library/Developer/CommandLineTools instead of /Applications/Xcode.app/Contents/Developer, or if the installed Xcode has no iOS simulator runtime downloaded, simctl returns nothing and Flutter concludes there are no devices.

How to fix it

1. Boot a simulator first, then list devices

This is the fix in the overwhelming majority of cases. Open the Simulator app, wait for a device window to appear, then check what Flutter sees:

open -a Simulator
flutter devices

You should now see a line like:

iPhone 16 (mobile) • 8A1C2F4E-... • ios • com.apple.CoreSimulator.SimRuntime.iOS-18-2

If you prefer to stay in the terminal, Flutter can launch the simulator for you:

flutter emulators
flutter emulators --launch apple_ios_simulator

flutter emulators lists the emulator definitions Flutter knows about; apple_ios_simulator is the built-in entry that opens Simulator.app. Once it is running, flutter run picks it up without any extra flags.

2. Target the device explicitly

When several targets are available, or when Flutter picks the wrong one, pass the device id from flutter devices:

flutter run -d "iPhone 16"

The name works, but the UDID is unambiguous:

xcrun simctl list devices booted
flutter run -d 8A1C2F4E-1234-4A5B-9C6D-0123456789AB

xcrun simctl list devices booted prints only the simulators that are currently running, which is exactly the set Flutter can use.

3. Point the developer directory at Xcode

If flutter devices still prints nothing after booting a simulator, verify the toolchain:

xcode-select -p

It must print /Applications/Xcode.app/Contents/Developer. If it prints /Library/Developer/CommandLineTools, switch it and accept the license components:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
flutter doctor -v

flutter doctor -v expands the Xcode section and tells you whether Flutter found Xcode, whether the simulator SDK is present, and whether CocoaPods is installed. Fix whatever that section flags before trying flutter run again.

4. Install a simulator runtime

A fresh Xcode install does not always ship with an iOS runtime. Open Xcode → Settings → Platforms and download the iOS simulator runtime you need. Then create or verify a device in Xcode → Window → Devices and Simulators.

After the download finishes, quit and reopen Simulator.app so the new runtime is picked up, then re-run flutter devices.

5. Reset a stuck simulator service

If a simulator window is open but Flutter still refuses to see it, the CoreSimulator service can be in a bad state. Shut everything down and boot a single device cleanly:

xcrun simctl shutdown all
open -a Simulator
flutter devices

Also try flutter clean in the project directory — a stale build directory occasionally leaves Flutter with a cached device list for the current session.

6. Running on a physical iPhone

A plugged-in iPhone is not automatically a Flutter target. On iOS 16 and later you must enable Settings → Privacy & Security → Developer Mode on the device, reboot it when prompted, and tap Trust on the computer when asked. The app also needs a signing team configured in Xcode, otherwise the build fails after the device is detected.

7. The Android side of the same message

If the missing device is an Android emulator rather than an iOS simulator, Flutter may be looking at the wrong SDK. Point it at the right one:

flutter config --android-sdk /path/to/Android/sdk

In Android Studio, also check that the project’s Project SDK is set to a recent Android API level; a project bound to an old or missing SDK will not produce a launchable emulator.

How to prevent it

  • Treat flutter devices as the source of truth — if the target is not listed there, flutter run will not find it either.
  • Boot the simulator before running the app, or use flutter emulators --launch apple_ios_simulator as the first step of your workflow.
  • Keep xcode-select -p pointing at Xcode.app; re-check it after installing Command Line Tools or a second Xcode.
  • Download simulator runtimes from Xcode → Settings → Platforms as soon as you update Xcode, so the runtime and the IDE stay in sync.
  • Run flutter doctor -v after any Xcode or macOS upgrade and clear the warnings it reports.

FAQ

Why does Flutter say “No connected devices” when the Simulator is installed?

Because Flutter lists running simulators, not installed ones. An installed simulator that is not booted is not a valid target. Open Simulator.app first, then run flutter devices to confirm it appears.

Does flutter run work with the iOS Simulator at all?

Yes. Flutter supports both iOS simulators and physical iOS devices. The simulator appears in flutter devices with the ios platform tag and a CoreSimulator runtime identifier, and you can select it with -d.

Why is my iPhone not listed even though it is plugged in?

On iOS 16 and later, Developer Mode must be enabled in Settings → Privacy & Security and the device restarted. You also need to trust the computer and have a signing team set in Xcode, or the build will fail after detection.

Sources & credits

Parts of this guide are adapted from content licensed under CC BY-SA 4.0; this article is shared under the same license.