iOS Question [SOLVED] GeoFence and closed app

Mike1970

Well-Known Member
Licensed User
Hi everyone.
I was wondering if it's possibile to set up a geofence that when you enter (or exit), triggers an event catchable with the app closed.
(like Apple "Find My" app, that can send a notification to you when a friend leave/arrive a place).
I'm not knowledge about this things , so I'm trying to discover new useful functionality
 

José J. Aguilar

Well-Known Member
Licensed User
Have you check this?

 

Mike1970

Well-Known Member
Licensed User
Yeah is the example I want to begin from, but it work with the app open.
My thought was if there is a way to catch the event when the app is totally closed
 

Mike1970

Well-Known Member
Licensed User
Ok I compiled the app in release, then I went out to test it.

1 test: app open , when I exit/enter the region it notify

2 test: app in background. Works

3 test: app CLOSED, when I enter/exit the region it notify, but execute all the script of appplication_start.

But I don’t know why when I tested to exit the region when the app was closed it said “exit” and after a second “enter” even if I was in the same place
 

Sandman

Well-Known Member
Licensed User
But I don’t know why when I tested to exit the region when the app was closed it said “exit” and after a second “enter” even if I was in the same place
Positioning isn't an exact science. And if you were just on the border, it's entirely possible that you could get that result. If I remember correctly, the OS determines the position using cell phone towers and wifi stations for all ambient positioning in the background. It probably (other forum members might know more about this) only activates the GPS when it really has to, such as when an app is in the foreground and requests an exact position (and the user allows it). The GPS is very expensive, batterywise, so the OS tries hard to minimize its' use. So, imagine how crude the position could be using just towers and wifi - and that could explain what happened to you.
 

Mike1970

Well-Known Member
Licensed User
Positioning isn't an exact science. And if you were just on the border, it's entirely possible that you could get that result. If I remember correctly, the OS determines the position using cell phone towers and wifi stations for all ambient positioning in the background. It probably (other forum members might know more about this) only activates the GPS when it really has to, such as when an app is in the foreground and requests an exact position (and the user allows it). The GPS is very expensive, batterywise, so the OS tries hard to minimize its' use. So, imagine how crude the position could be using just towers and wifi - and that could explain what happened to you.
it could be. however this is a minimal problem filtrable in someway I imagine, that i will think in the future!

Thanks for the tip
 
Top