eddieowens / react-native-boundary

Native implementation of geofencing/region monitoring

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is possible to make it work without fine location activated? (Only iOS)

mrigo opened this issue · comments

Hello,
I'm interested in this library, but I don't need an "always" permission when using my app, but only when in use.
Is it possible to do?
When the app has only "when in use" permission, I get the error:
"Access fine location is not permitted".

Is related to the permission level?

Thanks

I've added the Only iOS option because I think in Android there's no such problem, right?

As of now that is not possible. The IOS code have hardcoded checks for kCLAuthorizationStatusAuthorizedAlways

However if I were to do something like this when app is in focus only I would probably just start updating for location changes and check weather or not current location is in bounds using pure js (via some great-circle distance lib) since i would probably need greater accuracy, less delay and delivery consistancy than android/ios geofencing services provide. But that would drain more battery, so i guess it depends on the use-case. Would that fit your use-case or do you think this lib should update to resolve that hard-coded permission check?

Thanks for the reply!
In my case, I must start an audio file when the user enters into a region, but this library is not working so well both Android and iOS, not registering the entering in a region.
Also, users can choose "only when in use" permission, making this library useless :(
I'll try monitoring user position, but I'm afraid for the battery like you said...