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

Commit

Permalink
Compare device types and runtimes by their identifiers.
Browse files Browse the repository at this point in the history
  • Loading branch information
ExtremeMan committed Oct 31, 2017
1 parent e86dd01 commit 8334840
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xctool/xctool/SimulatorWrapper/SimulatorInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 8334840

Please sign in to comment.