jamesmontemagno / PermissionsPlugin

Check and Request Permissions Plugin for Xamarin and Windows
MIT License
282 stars 85 forks source link

[iOS] RequestPermissionsAsync(Permission.Location) never returns following a screen lock/unlock scenario #171

Closed bhapca closed 4 years ago

bhapca commented 4 years ago

Bug Information

Version Number of Plugin: 2.2.1 Device Tested On: iPhone 6s, iOS 13.3 Simulator Tested On: iPhone 11 Pro Max 13.3 Version of VS: 8.5 (Mac) Version of Xamarin: Xamarin.iOS 13.14.1.39 Versions of other things you are using:

Steps to reproduce the Behavior

  1. Using the PermissionSample project, increase MinimumOSVersion in Info.plist to 9.0, to get it to compile and run the iOS project.
  2. Tap the Get Location button at the top of the page. As expected, you'll be prompted to allow access to the location of the device.
  3. Lock the screen.
  4. Unlock the screen => notice that the prompt mentioned at step 2 is gone, the "Get Location" button appears as pressed, and the other buttons no nothing when tapped (although the UI is not frozen - the page is scrollable).

If you run this in the debugger, you can see that await CrossPermissions.Current.RequestPermissionsAsync(Permission.Location) never returns.

Expected Behavior

Actual Behavior

Code snippet

Screenshots

Simulator Screen Shot - iPhone 11 Pro Max - 2020-04-01 at 16 29 03 Simulator Screen Shot - iPhone 11 Pro Max - 2020-04-01 at 16 29 14 Simulator Screen Shot - iPhone 11 Pro Max - 2020-04-01 at 16 38 12

bhapca commented 4 years ago

It seems that this can't be reproduced consistently on a real device. Closing the issue.