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 { ...@@ -302,7 +302,8 @@ class IOSDevice extends Device {
} }
@override @override
bool isSupported() => true; // 32-bit devices are not supported.
bool isSupported() => cpuArchitecture == DarwinArch.arm64;
@override @override
Future<LaunchResult> startApp( Future<LaunchResult> startApp(
......
...@@ -64,7 +64,7 @@ void main() { ...@@ -64,7 +64,7 @@ void main() {
}); });
testWithoutContext('successfully instantiates on Mac OS', () { testWithoutContext('successfully instantiates on Mac OS', () {
IOSDevice( final IOSDevice device = IOSDevice(
'device-123', 'device-123',
iProxy: IProxy.test(logger: logger, processManager: FakeProcessManager.any()), iProxy: IProxy.test(logger: logger, processManager: FakeProcessManager.any()),
fileSystem: fileSystem, fileSystem: fileSystem,
...@@ -77,6 +77,23 @@ void main() { ...@@ -77,6 +77,23 @@ void main() {
cpuArchitecture: DarwinArch.arm64, cpuArchitecture: DarwinArch.arm64,
interfaceType: IOSDeviceConnectionInterface.usb, 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', () { 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