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

Would CrossGeofenceListener (IGeofenceListener) callbacks work on iOS if app is killed #12

Open
asehgal123 opened this issue Nov 29, 2018 · 1 comment

Comments

@asehgal123
Copy link

I am using this plugin for Android and it working well except for the System.InvalidCastException: Specified cast is not valid. bug which someone provided the workaround for.
My question is for iOS. If app is killed and a georegion is entered/exited would CrossGeofenceListener callbacks still be called?

@patkozlowski
Copy link

Yes, they do. In iOS, the geofencing API uses StartMonitoringSignificantLocationChanges which relaunches the app into the background if a new event arrives, IE a geofence event occurs. This is when the app is killed from memory too. You can read this. In Android, the provided service runs the geofencing triggers when the app is closed as well. In my testing, android 8 and above you have to use StartForgroundService instead of StartService, or else you'll get an exception due to google limiting starting services in the background.

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