flutter
flutter copied to clipboard
Support iOS targets in `et run`
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.
Can we not extend targetPlatform to differentiate between iOSDevice and iOSSimulator ?
You mean change the implementation of flutter devices --machine?
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.
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.
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.