Describe the bug
if user denied location request before. requestPermission() will just hang with no err.
Expected behavior
Return some value so we can make the function to deal with it.
Tested on:
x iOS, Version 10, simulator
+1
+1
+2
+3
For any others experiencing this issue, as a workaround you can use the location_permissions package.
That at the very least will return PermissionStatus.denied from LocationPermissions().requestPermissions() rather than hanging.
It also includes a very nice method LocationPermissions().openAppSettings() which leads the user straight to the place where they can allow your app location access; even after they have denied permission via the platform pop-up.
Hi, after some researches, this plugin executes that code : [self.clLocationManager requestWhenInUseAuthorization];
So i looked into Apples's CLLocationManager, and found that :
https://developer.apple.com/documentation/corelocation/cllocationmanager/1620562-requestwheninuseauthorization
" After the user makes a selection and determines the status, the location manager delivers the results to the delegate's locationManager(_:didChangeAuthorization:) method. If the initial authorization status is anything other than CLAuthorizationStatus.notDetermined, this method does nothing and doesn't call the locationManager(_:didChangeAuthorization:) method."
So I guess that on iOS, you're not allowed to ask repeatedly the user if he wants to allow the location permission ? Or maybe you should request it with an other way ?
It would be great to have a return at least when using ``requestPermission(). I found neither a fix nor a workaround so I'm just checking if the platform is iOS in my code and don't callrequestPermission()``` if it's the case.
+1
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Well then, here鈥檚 a bump.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@Lyokone If this project is unmaintained+abandoned, I recommend you archive it on GitHub, and discontinue it on Pub.
Most helpful comment
For any others experiencing this issue, as a workaround you can use the location_permissions package.
That at the very least will return
PermissionStatus.deniedfromLocationPermissions().requestPermissions()rather than hanging.It also includes a very nice method
LocationPermissions().openAppSettings()which leads the user straight to the place where they can allow your app location access; even after they have denied permission via the platform pop-up.