diff --git a/ios/Geofencing.swift b/ios/Geofencing.swift index f8c2861..35333b4 100644 --- a/ios/Geofencing.swift +++ b/ios/Geofencing.swift @@ -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