GeoLocation.authorizationRequest = 1;

I don’t seem to be able to set the authorization request as shown the documentation… I always get the same prompt on the device. I also can’t use GeoLocation without it being set to “Always” in device settings. It should be allowed when set to “In Use” as well… shouldn’t it?

Is anyone else seeing this behavior? It seems like that value isn’t being used properly, or this isn’t the way to set it. I don’t know about Android as I don’t have a device to test on at the moment.

More specifically:

  1. Not setting GeoLocation.authorizationRequest (default should be 1) - however I see the Request dialog on iPhone to “Always allow location services to run even when the app is not in use”

  2. Setting the GeoLocation.authorizationRequest to 1 or 2 does not change the dialog, nor the default setting on the device for my application. I still see the “Always…” dialog.

  3. When manually changing the setting to “When in use” on my device, both GeoLocation and MapView no longer work in my app.

  4. When debugging in XCode, I set breakpoints in both if statements and neither ran. This makes me think even the default isn’t working properly perhaps

void IOSLocationProvider::RequestAuthorization1(uObject* handle, int type)
        [] (::id handle, int type) -> void
            CLLocationManager* lm = (CLLocationManager*)handle;
            			if (type == 1 &&
            				[lm respondsToSelector:@selector(requestWhenInUseAuthorization)])
            					[lm requestWhenInUseAuthorization];
            			if (type == 2 &&
            				[lm respondsToSelector:@selector(requestAlwaysAuthorization)])
            					[lm requestAlwaysAuthorization];
        } (::g::ObjC::Helpers::GetHandle(handle), type);

If you are using the built-in Fuse.Maps control, that could also cause the issue. In particular in
MapViewDelegate.m there is an init method that sets the authorization request to always.

		self = [super init];
		_touchCount = 0;
		_locationMgr = [[CLLocationManager alloc] init];
		[_locationMgr requestAlwaysAuthorization];
		_annotations = [[NSMutableDictionary alloc] init];
		return self;

I think that is indeed my issue…

Thanks for reporting this in guys. iOS should only request the user location if the GUI features that display said location are requested so this is an oversight.

There is no Location request with build Android 4.4 & iOS 10.0
So “getLocation fail Location request timed out” on both devices

I need to enable GeoService in the settings of the application in iOS, than it starts working,
but on Android no result ((

Project file contains

"iOS": {
        "PList": {
            "UIRequiredDeviceCapabilities": [
            "NSLocationWhenInUseUsageDescription" : "Нам надо знать вашу скорость и другие параметры",
            "NSLocationAlwaysUsageDescription" : "Мы всегда хотим знать где вы находитесь"