Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/simulators/lib/simulator_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ class IosSimulatorManager {

final String output = runtimeListResult.stdout as String;
if (!output.contains(runtime)) {
print(output);
throw Exception('Mac does not have the requested $runtime '
'available for simulators. Please use XCode to install.');
'available for simulators. Please use Xcode to install.');
}

// Check if the device is available.
Expand All @@ -62,8 +63,9 @@ class IosSimulatorManager {

final String deviceListOutput = deviceListResult.stdout as String;
if (!deviceListOutput.contains(device)) {
print(deviceListOutput);
throw Exception('Mac does not have the requested device type $device '
'available for simulators. Please use XCode to install.');
'available for simulators. Please use Xcode to install.');
}

// Prepate device type argument. It should look like:
Expand Down Expand Up @@ -147,6 +149,7 @@ class IosSimulatorManager {

final int indexOfPhone = listOfPhones.indexOf(phone);
if (indexOfPhone == -1) {
print(simulatorsList);
throw Exception('Simulator of $phone is not available for iOS version '
'${osMajorVersion}.${osMinorVersion}');
}
Expand Down Expand Up @@ -177,6 +180,7 @@ class IosSimulatorManager {
output.contains('-- iOS ${osMajorVersion}.${osMinorVersion} --');

if (!versionCheck) {
print(output);
throw Exception(
'Requested simulator version iOS ${osMajorVersion}.${osMinorVersion} '
'is not available.');
Expand Down