Skip to content

Commit

Permalink
do not request location if asked previously
Browse files Browse the repository at this point in the history
  • Loading branch information
HarshaR1642 committed Oct 17, 2024
1 parent 04fe4b9 commit 34d20af
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ios/Geofencing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ class Geofencing: RCTEventEmitter, CLLocationManagerDelegate {
return
}

if CLLocationManager.authorizationStatus() != .notDetermined {
successCallback([["success": true, "location": getLocationAuthorizationStatus()]])
return
}

self.allowWhileUsing = allowWhileUsing
self.allowAlways = allowAlways
authorizationSuccessCallback = successCallback
Expand Down

0 comments on commit 34d20af

Please sign in to comment.