Skip to content

Commit

Permalink
Merge pull request #373 from doronz88/feature/request_always_authoriz…
Browse files Browse the repository at this point in the history
…ation

client: location: add `request_always_authorization()`
  • Loading branch information
doronz88 authored Oct 27, 2024
2 parents 87f0f06 + 105d2b0 commit 95733f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rpcclient/rpcclient/darwin/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ def last_sample(self) -> Optional[dict]:
return None
return location.objc_call('jsonObject').py()

def request_always_authorization(self) -> None:
""" Request authorization to always query location data """
self._location_manager.objc_call('requestAlwaysAuthorization')

def start_updating_location(self):
""" request location updates from CLLocationManager """
if self.authorization_status.value < CLAuthorizationStatus.kCLAuthorizationStatusAuthorizedAlways.value:
Expand Down

0 comments on commit 95733f0

Please sign in to comment.