Highlighted

GeoLocation issues on 10.3.3

Engaged ,
May 20, 2018

Copy link to clipboard

Copied

It appears we need both keys present for iOS 11+ to work properly - even though a when-in-use request is made:

<key>NSLocationWhenInUseUsageDescription</key>

<string>This helps you to set your current location when searching for...</string>

<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>

<string>This helps you to set your current location when searching for...</string>

The following still spawns an always-use request and not when-in-use

geoLocation = new Geolocation();

geoLocation.locationAlwaysUsePermission = false;//this should be false by default

geoLocation.requestPermission();

I'm also seeing two events after someone clicks "Yes" to the Apple prompt.  The first is PermissionStatus.GRANTED followed immediately by PermissionStatus.DENIED

Note - this is only on iOS 10.3.3 (and lower) - 11+ appears to be working as expected by showing the in-use prompt and kicking out PermissionStatus.ONLY_WHEN_IN_USE events.

TOPICS
Air beta

Views

472

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

GeoLocation issues on 10.3.3

Engaged ,
May 20, 2018

Copy link to clipboard

Copied

It appears we need both keys present for iOS 11+ to work properly - even though a when-in-use request is made:

<key>NSLocationWhenInUseUsageDescription</key>

<string>This helps you to set your current location when searching for...</string>

<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>

<string>This helps you to set your current location when searching for...</string>

The following still spawns an always-use request and not when-in-use

geoLocation = new Geolocation();

geoLocation.locationAlwaysUsePermission = false;//this should be false by default

geoLocation.requestPermission();

I'm also seeing two events after someone clicks "Yes" to the Apple prompt.  The first is PermissionStatus.GRANTED followed immediately by PermissionStatus.DENIED

Note - this is only on iOS 10.3.3 (and lower) - 11+ appears to be working as expected by showing the in-use prompt and kicking out PermissionStatus.ONLY_WHEN_IN_USE events.

TOPICS
Air beta

Views

473

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 20, 2018 0

Have something to add?

Join the conversation