Closed paweljankowski closed 6 years ago
Yeah, will need updating for iOS 11 I guess. PR welcome.
I could use some more detailed instructions on how to reproduce this and what happens.
This method works consistently for me:
always
permission was never asked before)CLLocationManager.promise(.whenInUse)
succesfullyCLLocationManager.promise(.always)
If you do this, the promotion dialog will show up but quickly close itself. This is because the promise will prematurely succeed due to the previously accepted whenInUse
permission. The dialog closes because the location manager gets released right after the location is retrieved (which is correct, but in this case we want to wait for the user to act upon the dialog)
So to fix this, we have to identify if this is a promotion request and prevent releasing the manager before the dialog is closed. Since retaining the manager for eternity would probably be bad, this may require some thought
Please review above PR
Pretty please review the above PR. Thanks!
When I'm asking for
whenInUse
location permission then when I'm asking foralways
the promise is fulfilled with current status (whenInUse
).