Commit bcac3166 authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Eliminate direct invocations of idevice_id for iOS (#10777)

All invocations should go via the IMobileDevice class in mac.dart.
parent 69653128
...@@ -42,7 +42,6 @@ class IOSDevices extends PollingDeviceDiscovery { ...@@ -42,7 +42,6 @@ class IOSDevices extends PollingDeviceDiscovery {
class IOSDevice extends Device { class IOSDevice extends Device {
IOSDevice(String id, { this.name }) : super(id) { IOSDevice(String id, { this.name }) : super(id) {
_installerPath = _checkForCommand('ideviceinstaller'); _installerPath = _checkForCommand('ideviceinstaller');
_listerPath = _checkForCommand('idevice_id');
_iproxyPath = _checkForCommand('iproxy'); _iproxyPath = _checkForCommand('iproxy');
_debuggerPath = _checkForCommand('idevicedebug'); _debuggerPath = _checkForCommand('idevicedebug');
_loggerPath = _checkForCommand('idevicesyslog'); _loggerPath = _checkForCommand('idevicesyslog');
...@@ -58,9 +57,6 @@ class IOSDevice extends Device { ...@@ -58,9 +57,6 @@ class IOSDevice extends Device {
String _installerPath; String _installerPath;
String get installerPath => _installerPath; String get installerPath => _installerPath;
String _listerPath;
String get listerPath => _listerPath;
String _iproxyPath; String _iproxyPath;
String get iproxyPath => _iproxyPath; String get iproxyPath => _iproxyPath;
......
...@@ -22,7 +22,7 @@ class IOSWorkflow extends DoctorValidator implements Workflow { ...@@ -22,7 +22,7 @@ class IOSWorkflow extends DoctorValidator implements Workflow {
@override @override
bool get appliesToHostPlatform => platform.isMacOS; bool get appliesToHostPlatform => platform.isMacOS;
// We need xcode (+simctl) to list simulator devices, and idevice_id to list real devices. // We need xcode (+simctl) to list simulator devices, and libimobiledevice to list real devices.
@override @override
bool get canListDevices => xcode.isInstalledAndMeetsVersionCheck; bool get canListDevices => xcode.isInstalledAndMeetsVersionCheck;
......
...@@ -201,11 +201,6 @@ void main() { ...@@ -201,11 +201,6 @@ void main() {
when(xcode.isInstalledAndMeetsVersionCheck).thenReturn(true); when(xcode.isInstalledAndMeetsVersionCheck).thenReturn(true);
when(xcode.eulaSigned).thenReturn(true); when(xcode.eulaSigned).thenReturn(true);
when(processManager.runSync(argThat(contains('idevice_id'))))
.thenReturn(exitsHappy);
when(processManager.run(argThat(contains('idevice_id')), workingDirectory: any, environment: any))
.thenReturn(exitsHappy);
final ValidationResult result = await new IOSWorkflowTestTarget().validate(); final ValidationResult result = await new IOSWorkflowTestTarget().validate();
expect(result.type, ValidationType.partial); expect(result.type, ValidationType.partial);
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
...@@ -222,11 +217,6 @@ void main() { ...@@ -222,11 +217,6 @@ void main() {
when(xcode.isInstalledAndMeetsVersionCheck).thenReturn(true); when(xcode.isInstalledAndMeetsVersionCheck).thenReturn(true);
when(xcode.eulaSigned).thenReturn(true); when(xcode.eulaSigned).thenReturn(true);
when(processManager.runSync(argThat(contains('idevice_id'))))
.thenReturn(exitsHappy);
when(processManager.run(argThat(contains('idevice_id')), workingDirectory: any, environment: any))
.thenReturn(exitsHappy);
ensureDirectoryExists(fs.path.join(homeDirPath, '.cocoapods', 'repos', 'master', 'README.md')); ensureDirectoryExists(fs.path.join(homeDirPath, '.cocoapods', 'repos', 'master', 'README.md'));
final ValidationResult result = await new IOSWorkflowTestTarget().validate(); final ValidationResult result = await new IOSWorkflowTestTarget().validate();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment