remove usages of booted (#10741)

This commit is contained in:
xster
2017-06-15 18:25:09 -07:00
committed by GitHub
parent 4b957bf028
commit 432ffde52e
2 changed files with 7 additions and 7 deletions

View File

@@ -228,12 +228,12 @@ class SimControl {
bool _isAnyConnected() => getConnectedDevices().isNotEmpty;
Future<bool> isInstalled(String appId) {
Future<bool> isInstalled(String deviceId, String appId) {
return exitsHappyAsync(<String>[
_xcrunPath,
'simctl',
'get_app_container',
'booted',
deviceId,
appId,
]);
}
@@ -253,8 +253,8 @@ class SimControl {
return runCheckedAsync(args);
}
Future<Null> takeScreenshot(String outputPath) {
return runCheckedAsync(<String>[_xcrunPath, 'simctl', 'io', 'booted', 'screenshot', outputPath]);
Future<Null> takeScreenshot(String deviceId, String outputPath) {
return runCheckedAsync(<String>[_xcrunPath, 'simctl', 'io', deviceId, 'screenshot', outputPath]);
}
}
@@ -340,7 +340,7 @@ class IOSSimulator extends Device {
@override
Future<bool> isAppInstalled(ApplicationPackage app) {
return SimControl.instance.isInstalled(app.id);
return SimControl.instance.isInstalled(id, app.id);
}
@override
@@ -596,7 +596,7 @@ class IOSSimulator extends Device {
@override
Future<Null> takeScreenshot(File outputFile) {
return SimControl.instance.takeScreenshot(outputFile.path);
return SimControl.instance.takeScreenshot(id, outputFile.path);
}
}

View File

@@ -161,7 +161,7 @@ void main() {
'/usr/bin/xcrun',
'simctl',
'io',
'booted',
'x',
'screenshot',
fs.path.join('some', 'path', 'to', 'screenshot.png'),
],