From c182e0e517cf6da688b3f9ff441341a860374eb8 Mon Sep 17 00:00:00 2001 From: Todd Volkert Date: Mon, 27 Nov 2017 12:55:59 -0800 Subject: [PATCH] Remove unused `pushFile` methods in ios classes (#13215) --- .../flutter_tools/lib/src/ios/devices.dart | 25 ------------------- .../flutter_tools/lib/src/ios/simulators.dart | 21 ---------------- 2 files changed, 46 deletions(-) diff --git a/packages/flutter_tools/lib/src/ios/devices.dart b/packages/flutter_tools/lib/src/ios/devices.dart index 861cc25cad..0fc819a047 100644 --- a/packages/flutter_tools/lib/src/ios/devices.dart +++ b/packages/flutter_tools/lib/src/ios/devices.dart @@ -43,16 +43,10 @@ class IOSDevice extends Device { IOSDevice(String id, { this.name, String sdkVersion }) : _sdkVersion = sdkVersion, super(id) { _installerPath = _checkForCommand('ideviceinstaller'); _iproxyPath = _checkForCommand('iproxy'); - _pusherPath = _checkForCommand( - 'ios-deploy', - 'To copy files to iOS devices, please install ios-deploy. To install, run:\n' - 'brew install ios-deploy' - ); } String _installerPath; String _iproxyPath; - String _pusherPath; final String _sdkVersion; @@ -302,25 +296,6 @@ class IOSDevice extends Device { return false; } - Future pushFile(ApplicationPackage app, String localFile, String targetFile) async { - if (platform.isMacOS) { - runSync([ - _pusherPath, - '-t', - '1', - '--bundle_id', - app.id, - '--upload', - localFile, - '--to', - targetFile - ]); - return true; - } else { - return false; - } - } - @override Future get targetPlatform async => TargetPlatform.ios; diff --git a/packages/flutter_tools/lib/src/ios/simulators.dart b/packages/flutter_tools/lib/src/ios/simulators.dart index 7831b653ac..a80485ce12 100644 --- a/packages/flutter_tools/lib/src/ios/simulators.dart +++ b/packages/flutter_tools/lib/src/ios/simulators.dart @@ -211,17 +211,6 @@ class IOSSimulator extends Device { String get xcrunPath => fs.path.join('/usr', 'bin', 'xcrun'); - String _getSimulatorPath() { - return fs.path.join(homeDirPath, 'Library', 'Developer', 'CoreSimulator', 'Devices', id); - } - - String _getSimulatorAppHomeDirectory(ApplicationPackage app) { - final String simulatorPath = _getSimulatorPath(); - if (simulatorPath == null) - return null; - return fs.path.join(simulatorPath, 'data'); - } - @override Future isAppInstalled(ApplicationPackage app) { return SimControl.instance.isInstalled(id, app.id); @@ -425,16 +414,6 @@ class IOSSimulator extends Device { return false; } - Future pushFile( - ApplicationPackage app, String localFile, String targetFile) async { - if (platform.isMacOS) { - final String simulatorHomeDirectory = _getSimulatorAppHomeDirectory(app); - await runCheckedAsync(['cp', localFile, fs.path.join(simulatorHomeDirectory, targetFile)]); - return true; - } - return false; - } - String get logFilePath { return fs.path.join(homeDirPath, 'Library', 'Logs', 'CoreSimulator', id, 'system.log'); }