Unverified Commit 888208c1 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Disallow `flutter run`-ing on 32-bit development devices (#97339)

parent b3d1f71d
......@@ -302,7 +302,8 @@ class IOSDevice extends Device {
}
@override
bool isSupported() => true;
// 32-bit devices are not supported.
bool isSupported() => cpuArchitecture == DarwinArch.arm64;
@override
Future<LaunchResult> startApp(
......
......@@ -64,7 +64,7 @@ void main() {
});
testWithoutContext('successfully instantiates on Mac OS', () {
IOSDevice(
final IOSDevice device = IOSDevice(
'device-123',
iProxy: IProxy.test(logger: logger, processManager: FakeProcessManager.any()),
fileSystem: fileSystem,
......@@ -77,6 +77,23 @@ void main() {
cpuArchitecture: DarwinArch.arm64,
interfaceType: IOSDeviceConnectionInterface.usb,
);
expect(device.isSupported(), isTrue);
});
testWithoutContext('32-bit devices are unsupported', () {
final IOSDevice device = IOSDevice(
'device-123',
iProxy: IProxy.test(logger: logger, processManager: FakeProcessManager.any()),
fileSystem: fileSystem,
logger: logger,
platform: macPlatform,
iosDeploy: iosDeploy,
iMobileDevice: iMobileDevice,
name: 'iPhone 1',
cpuArchitecture: DarwinArch.armv7,
interfaceType: IOSDeviceConnectionInterface.usb,
);
expect(device.isSupported(), isFalse);
});
testWithoutContext('parses major version', () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment