File tree 2 files changed +20
-2
lines changed 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -302,7 +302,8 @@ class IOSDevice extends Device {
302
302
}
303
303
304
304
@override
305
- bool isSupported () => true ;
305
+ // 32-bit devices are not supported.
306
+ bool isSupported () => cpuArchitecture == DarwinArch .arm64;
306
307
307
308
@override
308
309
Future <LaunchResult > startApp (
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ void main() {
64
64
});
65
65
66
66
testWithoutContext ('successfully instantiates on Mac OS' , () {
67
- IOSDevice (
67
+ final IOSDevice device = IOSDevice (
68
68
'device-123' ,
69
69
iProxy: IProxy .test (logger: logger, processManager: FakeProcessManager .any ()),
70
70
fileSystem: fileSystem,
@@ -77,6 +77,23 @@ void main() {
77
77
cpuArchitecture: DarwinArch .arm64,
78
78
interfaceType: IOSDeviceConnectionInterface .usb,
79
79
);
80
+ expect (device.isSupported (), isTrue);
81
+ });
82
+
83
+ testWithoutContext ('32-bit devices are unsupported' , () {
84
+ final IOSDevice device = IOSDevice (
85
+ 'device-123' ,
86
+ iProxy: IProxy .test (logger: logger, processManager: FakeProcessManager .any ()),
87
+ fileSystem: fileSystem,
88
+ logger: logger,
89
+ platform: macPlatform,
90
+ iosDeploy: iosDeploy,
91
+ iMobileDevice: iMobileDevice,
92
+ name: 'iPhone 1' ,
93
+ cpuArchitecture: DarwinArch .armv7,
94
+ interfaceType: IOSDeviceConnectionInterface .usb,
95
+ );
96
+ expect (device.isSupported (), isFalse);
80
97
});
81
98
82
99
testWithoutContext ('parses major version' , () {
You can’t perform that action at this time.
0 commit comments