Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.

Conversation

jamesmontemagno
Copy link
Collaborator

Description of Change

Must cache location manager: https://stackoverflow.com/questions/7888896/current-location-permission-dialog-disappears-too-quickly/8170382

Clean it up when doen.

Bugs Fixed

Provide links to issues here. Ensure that a GitHub issue was created for your feature or bug fix before sending PR.

API Changes

None

Behavioral Changes

Else dialog disappears :(

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Updated documentation (see walkthrough)

@jamesmontemagno jamesmontemagno requested a review from Redth January 29, 2020 17:15

internal static Task<PermissionStatus> RequestLocationAsync(bool whenInUse, Action<CLLocationManager> invokeRequest)
{
var locationManager = new CLLocationManager();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if we come back in here without waiting for the flow to complete? We might leak...

@jamesmontemagno jamesmontemagno merged commit 72447a0 into master Jan 31, 2020
@jamesmontemagno jamesmontemagno added this to the 1.4.0 milestone Jan 31, 2020
@jamesmontemagno jamesmontemagno deleted the bug/gh-1066 branch February 7, 2020 23:14
@abhcr
Copy link

abhcr commented Mar 30, 2021

The dialog box does not appear at all in iOS when calling
await Permissions.RequestAsync<Permissions.LocationWhenInUse>();.
Xamarin Essentials v 1.6.1
Xamarin Forms v 5.0.0.2012

Meanwhile the other permissions like Mic and camera works just fine with the permission dialog.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants