-
Notifications
You must be signed in to change notification settings - Fork 505
on iOS 14 the "Allow Location" prompt is show very briefly, then it instantly goes away before I'm able to click "Use location while in App" #1489
Comments
This will probably be fixed once we merge #1487 Then you won't need to use this code as either. |
@mattleibow awesome thanks for the response! once the new version is pushed i'll update and try it out. if its successful i'll close this puppy out. 👍 |
You can test the fix in the nuget from the artifacts here: I'm going to just make sure that VS2017 is not broken with this, and then I'll merge and then the build will go out to the preview feed: https://aka.ms/xamarin-essentials-ci/index.json |
@mattleibow hi! is this part of the beta 3 release that just dropped? if so i'm not seeing the issue fixed :( |
when i keep this code in
It actually flashes like the prompt is going to go away once, then it actually remains. so technically this could be used as as work around i think, but it still seems fishy. any thoughts? thank you! |
I believe it was fixed. Are you able to submit a small repro case? I tested on my device and it stays available until I tap it. And now it also no longer hangs on iOS 14. |
I'll look to submit a small repo case and see if I see it there. thanks! |
@aherrick Did you manage to get a repro case? I just tested on iOS 10 and iOS 14, the pop up stays around until I tap something. |
@mattleibow thanks for checking back! Actually I was able to get this resolved things are looking good on the latest build! I'm closing this for now. cheers. |
@mattleibow I may have a repro case for this issue. It works without any problems after installation & first start. However if the user decides to change it in the (IOS)AppSettings to "Ask next time" this issue appears. |
On IOS if you like to request LocationAlways you have to request locationWhenInUse first. This means in an average implementation one would have to consecutive call await Permissions.RequestAsync<Permissions.LocationWhenInUse>(); Permissions.RequestAsync<Permissions.LocationAlways>(); Both use the static LocationManager instance. Since RequestAsync<Permissions.LocationWhenInUse>() sets the result of the task completition source before cleaning up its locationManager there is a race condition where RequestAsync<Permission.LocationAlways>() already runs and thus this cleanup disposes the locationManager used by the second call. This will not always be the case but in my test around 50% of the time. Workaround wait 3-10 seconds in between the calls
On IOS if you like to request LocationAlways you have to request locationWhenInUse first. This means in an average implementation one would have to consecutive call await Permissions.RequestAsync<Permissions.LocationWhenInUse>(); Permissions.RequestAsync<Permissions.LocationAlways>(); Both use the static LocationManager instance. Since RequestAsync<Permissions.LocationWhenInUse>() sets the result of the task completition source before cleaning up its locationManager there is a race condition where RequestAsync<Permission.LocationAlways>() already runs and thus this cleanup disposes the locationManager used by the second call. This will not always be the case but in my test around 50% of the time. Workaround wait 3-10 seconds in between the calls
set result after cleanup of locationmanager #1489
What I'm seeing is when requesting location, on iOS 14 the "Allow Location" prompt is show very briefly, then it instantly goes away before I'm able to click "Use location while in App"
Is this issue related? Below is my simple code. Wasn't sure if its somehow related to this:
https://stackoverflow.com/questions/7888896/current-location-permission-dialog-disappears-too-quickly
#1066
Video showing the issue:
https://streamable.com/3o51ah
Originally posted by @aherrick in #1390 (comment)
The text was updated successfully, but these errors were encountered: