diff --git a/app/appium.js b/app/appium.js index a7f1d7368..e9cdadc72 100644 --- a/app/appium.js +++ b/app/appium.js @@ -474,10 +474,6 @@ Appium.prototype.invoke = function() { device.stop = function(cb) { cb(); }; this.devices[this.deviceType] = device; } else if (this.isIos()) { - var useLocationServices = this.desiredCapabilities.useLocationServices; - if (useLocationServices !== false) { - useLocationServices = true; - } var iosOpts = { rest: this.rest , webSocket: this.webSocket @@ -496,7 +492,6 @@ Appium.prototype.invoke = function() { , startingOrientation: this.desiredCapabilities.deviceOrientation || this.args.orientation , robotPort: this.args.robotPort , robotAddress: this.args.robotAddress - , useLocationServices: useLocationServices }; this.devices[this.deviceType] = ios(iosOpts); } else if (this.isAndroid()) { diff --git a/app/ios.js b/app/ios.js index b6c5d66f7..411bb07fd 100644 --- a/app/ios.js +++ b/app/ios.js @@ -44,7 +44,6 @@ var IOS = function(args) { this.reset = args.reset; this.automationTraceTemplatePath = args.automationTraceTemplatePath; this.removeTraceDir = args.removeTraceDir; - this.useLocationServices = args.useLocationServices; this.deviceType = args.deviceType; this.startingOrientation = args.startingOrientation || "PORTRAIT"; this.curOrientation = this.startingOrientation; @@ -212,7 +211,6 @@ IOS.prototype.onInstrumentsLaunch = function(launchCb) { async.series([ this.setBundleId.bind(this), this.setInitialOrientation.bind(this), - this.setLocationServicesPref.bind(this), this.navToInitialWebview.bind(this) ], function(err) { if (err) return launchCb(err); @@ -252,12 +250,6 @@ IOS.prototype.setInitialOrientation = function(cb) { } }; -IOS.prototype.setLocationServicesPref = function(cb) { - var cmd = "setBootstrapConfig: useLocationServices=" + - JSON.stringify(this.useLocationServices); - this.proxy(cmd, cb); -}; - IOS.prototype.navToInitialWebview = function(cb) { if (this.autoWebview) { this.navToFirstAvailWebview(cb); diff --git a/app/uiauto/bootstrap.js b/app/uiauto/bootstrap.js index f64d9393f..24f835e69 100644 --- a/app/uiauto/bootstrap.js +++ b/app/uiauto/bootstrap.js @@ -15,14 +15,6 @@ var cmd = getFirstCommand(); var bootstrapSettings = {}; UIATarget.onAlert = function(alert) { - var alertName = alert.name() || ''; - if (alertName.indexOf("Use Your Current Location") !== -1) { - if (bootstrapSettings.useLocationServices) { - alert.buttons()["OK"].tap(); - } else { - alert.buttons()[0].tap(); - } - } return true; }; var result;