Bug 34560 - iOS Location Services authorization disrupts Test Cloud scripting
Summary: iOS Location Services authorization disrupts Test Cloud scripting
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Test Cloud ()
Version: 5.9
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: master
Assignee: Matt Ward
Depends on:
Reported: 2015-10-05 11:21 UTC by Matt Gerber
Modified: 2016-04-26 02:39 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Matt Gerber 2015-10-05 11:21:25 UTC
If an iOS app uses background location monitoring, it will run into problems when deploying UiTest locally and in the Xamarin Test Cloud. The problems stem from the iOS system prompt that is shown when the app starts up:

"Turn On Location Services to Allow "XXXX" to Determine Your Location"

This dialog is displayed if location services are turned off, and the dialog is not accessible via the REPL tree command. Thus, this dialog cannot be dismissed via UiTest commands, and subsequent UiTest commands fail because the UI elements are blocked by the dialog.
Comment 1 Matt Ward 2015-10-05 11:29:35 UTC
Opened issue 679 with UITest team for this problem.
Comment 2 Matt Gerber 2015-10-28 12:29:29 UTC
@Matt - Any updates on this issue?
Comment 3 Matt Ward 2015-10-29 07:01:17 UTC
Sorry, no updates at the current time.
Comment 4 Matt Ward 2015-11-30 11:42:31 UTC
The issue logged with the UITest team has been closed.

On the Test Cloud server the location services are enabled on the devices so the dialog will not be shown.

When running locally the UITest team recommend that as a workaround you should configure the device to allow location services before using the device with UITest.
Comment 5 Matt Gerber 2015-11-30 12:01:57 UTC
The first time I saw this problem was in the Test Cloud, so I don't think this addresses the issue.
Comment 6 Matt Ward 2015-11-30 12:15:31 UTC
If you are seeing the error still in the Test Cloud server would you be able to provide the link to the test which is failing?
Comment 7 Eugene Berdnikov 2016-04-26 02:39:54 UTC
I'm using CLLocationManager.RequestWhenInUseAuthorization() method from my code, so the device displays a request for using of user's location, e.g.
> Allow "AppName" to access your location while you use the app?
> Don't Allow | Allow
This request is suppressed when test is running on the Simulator, but it is still displayed when I run the test on my local device as well as in the Test Cloud (find example of failed test here https://testcloud.xamarin.com/app/e394c765-f9a3-4d7c-9c87-5a11a744dadb/).