Flutter debug app installs on an iPhone or iPad but the Dart VM never starts
Flutter IOS debug build installs the app on a real device but fails to initialize dart VM serverShort 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.
Fix it fast
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> -v2Match what you see, then jump to its fix
- 1
The 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
The 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
Works 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
The 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
- 1
What does the error look like?
Flutter IOS debug build installs the app on a real device but fails to initialize dart VM serverEXC_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 app2Fix
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 terminalConfirmed by docs.flutter.dev
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> --debug2Fix
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> --profile3Verify
The profile build opens from the icon after you stop the tool and unplug the cable.
flutter run -d <device_id> --profileConfirmed by github.com
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 inet2Fix
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.03Verify
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 XcodeConfirmed by docs.flutter.dev
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 Mode2Fix
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 devicesConfirmed by docs.flutter.dev
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:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- Qist BazaarA buy-now-pay-later marketplace built from a blank repo, now past 100K downloads on Google Play.
- SessionBirdAn omnichannel engagement suite in Flutter: campaigns, chatbot, tickets, analytics and live calling.
Related fixes
Mobile apps
Flutter Image.network shows nothing or throws when the image fails
EXCEPTION: resolving an image codec
Image.network throws an exception that goes to FlutterError.onError when a download or decode fails, so a 404 leaves a red screen or an empty box.
3 causes, each with a fixMobile apps
Flutter cannot open a file: OS Error No such file or directory
FileSystemException: Cannot open file, path = '...' (OS Error: No such file or directory, errno = 2)
Errno 2 means the exact path you gave does not exist on the device.
3 causes, each with a fixMobile apps
Flutter says Unable to load asset for an image or file that exists
The asset does not exist or has empty data.
Flutter only bundles files that pubspec.yaml lists.
4 causes, each with a fixMobile apps
Apple rejected the app under Guideline 4.3, Design: Spam
Guideline 4.3(b) - Design - Spam
Guideline 4.3 is Apple's duplicate rule.
5 causes, each with a fixMobile apps
AudioCache has no play method after updating audioplayers
The method 'play' isn't defined for the type 'AudioCache'.
Since audioplayers 1.0, AudioCache only turns asset files into local files and caches them.
2 causes, each with a fixMobile apps
Flutter Bloc throws that emit was called after the event handler completed
emit was called after an event handler completed normally.
Each on<Event> handler gets its own Emitter, and it stops working the moment the handler's returned Future completes.
2 causes, each with a fix