Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeoFencing not working #2243

Closed
Keerthirathinam opened this issue Jan 7, 2025 · 7 comments
Closed

GeoFencing not working #2243

Keerthirathinam opened this issue Jan 7, 2025 · 7 comments

Comments

@Keerthirathinam
Copy link

Plugin version: 4.18.3
Platform: iOS
OS version: iOS 18.1.1
Device manufacturer / model: iPhone 15 Pro
React Native version (react-native -v): 0.72.10
Xcode version: 16.2

So I added geofence and I am trying to see in in the portal while using getGeoFence I can able to see it in my local but in the website it is not reflecting. I tried with the demo app too same happening there

@christocracy
Copy link
Member

See wiki “Debugging”.

Learn to use Config.debug. Learn to observe the native logs. See api docs .emailLog.

See API docs “Geofencing Guide”.

@Keerthirathinam
Copy link
Author

I've reviewed the documentation and have a question. I'm implementing geofencing using only addGeoFence and onGeoFenceChange (or onGeoFence), without relying on getCurrentPosition. My goal is to detect whether I'm already inside a geofence upon its creation using the geofenceInitialTriggerEntry option. However, I've noticed that the geofence initially registers as an 'entry' only after I physically enter the location and then exit. In scenarios where the geofence is created for a location other than my current one, the initial state should logically register as 'exit,' but this behavior seems unsupported. Could you provide clarification or suggest a solution?

@christocracy
Copy link
Member

While sitting in my office, if I create a geofence around my current position, the geofence fires immediately.

If I call .stop() then .start(), the geofence ENTER event will immediately fire again.

@Keerthirathinam
Copy link
Author

Right, But I am sitting in my office but I want to create a geofence location to my home in that case it won't work right?

@christocracy
Copy link
Member

it won't work right?

What won’t work?

@christocracy
Copy link
Member

In scenarios where the geofence is created for a location other than my current one, the initial state should logically register as 'exit,'

You can’t have an EXIT without an ENTER. This is completely logical. This is how the native geofence APIs operate.

It makes 0 sense to expect a geofence EXIT to fire even if you’ve never entered it before. If that’s what you’re hoping for, you need to rethink what you’re doing.

@christocracy
Copy link
Member

I’m not here to provide free application development support..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants