Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit 8334840

Browse files
committed
Compare device types and runtimes by their identifiers.
1 parent e86dd01 commit 8334840

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

xctool/xctool/SimulatorWrapper/SimulatorInfo.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ - (NSString *)simulatedDeviceInfoName
222222
}
223223
NSMutableArray *supportedDeviceTypes = [NSMutableArray array];
224224
for (SimDevice *device in [_simulatedDeviceSet availableDevices]) {
225-
if (![device.runtime isEqual:runtime]) {
225+
if (![device.runtime.identifier isEqual:runtime.identifier]) {
226226
continue;
227227
}
228228

@@ -307,8 +307,8 @@ - (SimDevice *)simulatedDevice
307307
SimDeviceType *deviceType = supportedDeviceTypesByAlias[[self simulatedDeviceInfoName]];
308308
NSAssert(deviceType != nil, @"Unable to find SimDeviceType for the device with name \"%@\". Available device names: %@", [self simulatedDeviceInfoName], [supportedDeviceTypesByAlias allKeys]);
309309
for (SimDevice *device in [_simulatedDeviceSet availableDevices]) {
310-
if ([device.deviceType isEqual:deviceType] &&
311-
[device.runtime isEqual:runtime]) {
310+
if ([device.deviceType.identifier isEqual:deviceType.identifier] &&
311+
[device.runtime.identifier isEqual:runtime.identifier]) {
312312
_simulatedDevice = device;
313313
break;
314314
}

0 commit comments

Comments
 (0)