flutter icon indicating copy to clipboard operation
flutter copied to clipboard

Support iOS targets in `et run`

Open matanlurey opened this issue 1 year ago • 3 comments

et run (which builds the engine, and passes --local-engine flags to flutter run) does not support iOS.

Besides finding a champion that regularly builds and debugs iOS engines to help develop (and dogfood) this workflow, we also might have assumptions in et that don't hold for iOS builds. For example, <RunTarget>.buildConfigFor makes an assumption about a 1:1 mapping from a target platform to an engine build:

String buildConfigFor(String mode) {
  switch (targetPlatform) {
    case 'android-arm64':
      return 'android_${mode}_arm64';
    case 'darwin':
      return 'host_$mode';
    case 'web-javascript':
      return 'chrome_$mode';
    default:
      throw UnimplementedError('No mapping for $targetPlatform');
  }
}

However, for iOS, there isn't such a 1:1 mapping, as there are separate builds for an iOS simulator or device.

RunTarget would need to be expanded to receive both the TargetPlatform and emulator key.

matanlurey avatar Sep 30 '24 22:09 matanlurey

Can we not extend targetPlatform to differentiate between iOSDevice and iOSSimulator ?

johnmccutchan avatar Oct 01 '24 00:10 johnmccutchan

You mean change the implementation of flutter devices --machine?

matanlurey avatar Oct 01 '24 00:10 matanlurey

We also could wait until the monorepo, utilize the existing flutter command line logic, and teach every command how to check if the engine checkout is dirty. The tool device discovery knows if it is targeting a simulator or physical device.

jmagman avatar Oct 01 '24 02:10 jmagman

We believe that et is reasonably complete at this point and so I am closing this issue to shrink the backlog. If you disagree, feel free to reopen.

jonahwilliams avatar Apr 01 '25 17:04 jonahwilliams

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

github-actions[bot] avatar Apr 15 '25 18:04 github-actions[bot]