Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Flutter debug app installs on an iPhone or iPad but the Dart VM never starts

ErrorFlutter IOS debug build installs the app on a real device but fails to initialize dart VM server

Short answer

On iOS 14 and later a debug build needs the Local Network permission for the Dart VM service, and it can only be started by Flutter tooling or Xcode, not by tapping its icon. Check the permission, launch from flutter run, use a profile build for icon launches, and add the VM host flag for Wi-Fi debugging.

  • Applies to Flutter 3.3x stable, Xcode 26, iOS 17 to 26
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    List the connected device and run the app from the terminal. Watch the console for the VM service line and for the permission dialog on the device screen.

    flutter devices
    flutter run -d <device_id> -v
  2. 2Match what you see, then jump to its fix

    1. 1The app installs and opens, but hot reload and DevTools never attach, or the tool waits for the VM serviceThe Local Network permission was declined or never shownFix
    2. 2The app closes at once or crashes with EXC_BAD_ACCESS (SIGKILL - CODESIGNING) when you tap its icon, though it ran fine from flutter runA debug build was opened from the home screen iconFix
    3. 3Works over the cable, but fails when the device is connected to Xcode over Wi-FiDebugging over Wi-Fi without the VM service host argumentFix
    4. 4The icon is on the device but the app refuses to open, or the device shows an untrusted developer messageDeveloper Mode is off or the developer certificate is not trustedFix

What does the error look like?

  • Flutter IOS debug build installs the app on a real device but fails to initialize dart VM server
  • EXC_BAD_ACCESS (SIGKILL - CODESIGNING)

Cause 1 of 4

The Local Network permission was declined or never shown

1Check

Flutter uses the local network to reach the app's debug service. On iOS 14 and later the device asks once; if the dialog was dismissed or refused, the connection stays blocked. This affects debug and profile builds only.

# On the device: Settings > Privacy > Local Network > your app

2Fix

Turn the switch on for your app in Settings > Privacy > Local Network. If the app is missing from the list, delete it from the device and run it again so the dialog appears.

flutter clean
flutter run -d <device_id>

3Verify

The tool prints the VM service address and hot reload (r in the terminal) works.

# press r in the flutter run terminal

Confirmed by docs.flutter.dev

Did this fix it?

Cause 2 of 4

A debug build was opened from the home screen icon

1Check

Debug builds on iOS 14 and later cannot be started by hand. Apple changed a kernel behaviour that an API in the Dart runtime relies on, so the Flutter team's answer is to start debug builds from tooling.

flutter run -d <device_id> --debug

2Fix

Start the app with flutter run, an IDE, or Xcode (open ios/Runner.xcworkspace). If you need an app that opens from its icon, install a profile or release build instead.

flutter run -d <device_id> --profile

3Verify

The profile build opens from the icon after you stop the tool and unplug the cable.

flutter run -d <device_id> --profile

Confirmed by github.com

Did this fix it?

Cause 3 of 4

Debugging over Wi-Fi without the VM service host argument

1Check

For a wireless iOS device the VM service must listen on an address the Mac can reach. Flutter's docs add an argument in the Xcode scheme for this.

ifconfig | grep inet

2Fix

In Xcode choose Product > Scheme > Edit Scheme > Run > Arguments, and under Arguments Passed On Launch add --vm-service-host=0.0.0.0 if the Mac uses IPv4, or --vm-service-host=::0 if it uses IPv6.

# Xcode scheme, Arguments Passed On Launch:
--vm-service-host=0.0.0.0

3Verify

Run from Xcode; the Debug area prints a line starting with flutter: The Dart VM service is listening on.

# read the Debug area at the bottom of Xcode

Confirmed by docs.flutter.dev

Did this fix it?

Cause 4 of 4

Developer Mode is off or the developer certificate is not trusted

1Check

Apple requires Developer Mode on the device, and the signing certificate has to be trusted under VPN & Device Management.

# On the device: Settings > Privacy & Security > Developer Mode

2Fix

Turn Developer Mode on and restart the device. Then open Settings > VPN & Device Management, tap your certificate under Developer App and choose Trust.

flutter run -d <device_id>

3Verify

flutter devices lists the device without a warning and the app opens.

flutter devices

Confirmed by docs.flutter.dev

Did this fix it?

How do I stop it coming back?

  • Always start debug builds from flutter run, your IDE or Xcode, never by tapping the icon.
  • Accept the Local Network dialog the first time it appears.
  • Keep a profile build on the device for demos that must open from the icon.
  • Keep the Mac and device on the same network when you debug over Wi-Fi.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.