I would like to implement a geofence based domotic activation system.
There are different ways to define a geofence (e.g.). What I am concerned about is how this will all come together (service activation).
I am thinking of the use case where the geofence is set up by the user via phone (say via the App I am developing). Once this is done then the data will be stored in a remote webservice. iOS app development guidelines says that you cannot have an app running in the background and here my doubts start..
The point of defining the geofence is to activate some domestic/domotic service once the user enters the geofence that he defined as house. However if the App is running on background how can I get the app to communicate the position to the web service?
I have found this tutorial on remote background data fetching.
Apple developer documentation mentions that you can get background location change updates and hence I assume I can have some code to perform certain actions within the app when I receive a location change call back (from the location manager service). If this is correct I am then wondering whether combining this step plus using remote posting of data may be a valid solution (this has to happen when the app is in background mode).
If not would you be able to suggest an alternative approach?
0 comments:
Post a Comment