iOS iteration speed
iOS iteration speed
Section titled “iOS iteration speed”flutter run against a physical iPhone on iOS 17+ is slow for reasons that live in the
toolchain, not in this app. Flutter takes the CoreDevice branch, which (a) installs the whole
bundle every time — the appDeltaDirectory incremental path only exists on the older
ios-deploy branch — and (b) launches the app suspended and leaves it frozen until it has
found the PID via devicectl, started LLDB and attached. That frozen window is the black
screen. In debug there is an extra cost: LLDB sets a breakpoint on
NOTIFY_DEBUGGER_ABOUT_RX_PAGES (the iOS 26 JIT workaround in
ios/Flutter/ephemeral/flutter_lldb_helper.py), so every RX page the Dart VM allocates is a
breakpoint round-trip over USB.
So:
- Debug on the iOS Simulator. There is no LLDB path, no
devicectlinstall and no code-signature validation there — install is a directory copy. This is by far the fastest loop and it is what the E2E suite already uses. - On real hardware, prefer a USB-C iPhone. The debug bundle is ~200 MB and an iPhone 11 or older is Lightning, i.e. USB 2.
- Use
--releasefor “does it work on hardware” checks — it skips the debugger attach. - Do not reach for
flutter config --no-enable-lldb-debugging. It falls back to the Xcode-automation path, which drives Xcode over AppleScript and is generally slower. It is a diagnostic, not a fix.
Pods link statically (use_frameworks! :linkage => :static in ios/Podfile) so they do
not each become a separately signed, dyld-loaded framework inside Runner.app. Keep it that
way; reverting to plain use_frameworks! puts ~60 framework bundles back into every install.