From bcac3166abd7e7aeaf2ce2070032a813c56b913a Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Fri, 16 Jun 2017 10:41:48 -0700 Subject: [PATCH] Eliminate direct invocations of idevice_id for iOS (#10777) All invocations should go via the IMobileDevice class in mac.dart. --- packages/flutter_tools/lib/src/ios/devices.dart | 4 ---- packages/flutter_tools/lib/src/ios/ios_workflow.dart | 2 +- packages/flutter_tools/test/ios/ios_workflow_test.dart | 10 ---------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/packages/flutter_tools/lib/src/ios/devices.dart b/packages/flutter_tools/lib/src/ios/devices.dart index 1c11cfa244..83b53df790 100644 --- a/packages/flutter_tools/lib/src/ios/devices.dart +++ b/packages/flutter_tools/lib/src/ios/devices.dart @@ -42,7 +42,6 @@ class IOSDevices extends PollingDeviceDiscovery { class IOSDevice extends Device { IOSDevice(String id, { this.name }) : super(id) { _installerPath = _checkForCommand('ideviceinstaller'); - _listerPath = _checkForCommand('idevice_id'); _iproxyPath = _checkForCommand('iproxy'); _debuggerPath = _checkForCommand('idevicedebug'); _loggerPath = _checkForCommand('idevicesyslog'); @@ -58,9 +57,6 @@ class IOSDevice extends Device { String _installerPath; String get installerPath => _installerPath; - String _listerPath; - String get listerPath => _listerPath; - String _iproxyPath; String get iproxyPath => _iproxyPath; diff --git a/packages/flutter_tools/lib/src/ios/ios_workflow.dart b/packages/flutter_tools/lib/src/ios/ios_workflow.dart index 35ee3ba7a4..4e3589d1dc 100644 --- a/packages/flutter_tools/lib/src/ios/ios_workflow.dart +++ b/packages/flutter_tools/lib/src/ios/ios_workflow.dart @@ -22,7 +22,7 @@ class IOSWorkflow extends DoctorValidator implements Workflow { @override 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 bool get canListDevices => xcode.isInstalledAndMeetsVersionCheck; diff --git a/packages/flutter_tools/test/ios/ios_workflow_test.dart b/packages/flutter_tools/test/ios/ios_workflow_test.dart index b1142481a7..65fd9ec0a8 100644 --- a/packages/flutter_tools/test/ios/ios_workflow_test.dart +++ b/packages/flutter_tools/test/ios/ios_workflow_test.dart @@ -201,11 +201,6 @@ void main() { when(xcode.isInstalledAndMeetsVersionCheck).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(); expect(result.type, ValidationType.partial); }, overrides: { @@ -222,11 +217,6 @@ void main() { when(xcode.isInstalledAndMeetsVersionCheck).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')); final ValidationResult result = await new IOSWorkflowTestTarget().validate();