From 8334840d14d4932187b45cc44af3ba71eecb7e62 Mon Sep 17 00:00:00 2001 From: Aleksey Kononov Date: Mon, 30 Oct 2017 22:20:33 -0700 Subject: [PATCH] Compare device types and runtimes by their identifiers. --- xctool/xctool/SimulatorWrapper/SimulatorInfo.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xctool/xctool/SimulatorWrapper/SimulatorInfo.m b/xctool/xctool/SimulatorWrapper/SimulatorInfo.m index fb10fe5d2..6c3706857 100644 --- a/xctool/xctool/SimulatorWrapper/SimulatorInfo.m +++ b/xctool/xctool/SimulatorWrapper/SimulatorInfo.m @@ -222,7 +222,7 @@ - (NSString *)simulatedDeviceInfoName } NSMutableArray *supportedDeviceTypes = [NSMutableArray array]; for (SimDevice *device in [_simulatedDeviceSet availableDevices]) { - if (![device.runtime isEqual:runtime]) { + if (![device.runtime.identifier isEqual:runtime.identifier]) { continue; } @@ -307,8 +307,8 @@ - (SimDevice *)simulatedDevice SimDeviceType *deviceType = supportedDeviceTypesByAlias[[self simulatedDeviceInfoName]]; NSAssert(deviceType != nil, @"Unable to find SimDeviceType for the device with name \"%@\". Available device names: %@", [self simulatedDeviceInfoName], [supportedDeviceTypesByAlias allKeys]); for (SimDevice *device in [_simulatedDeviceSet availableDevices]) { - if ([device.deviceType isEqual:deviceType] && - [device.runtime isEqual:runtime]) { + if ([device.deviceType.identifier isEqual:deviceType.identifier] && + [device.runtime.identifier isEqual:runtime.identifier]) { _simulatedDevice = device; break; }