Question

My idea was creating iOS applications where the user can enter a location. This location is stored in a remote database with the device id for push notifications. Then the application on the remote server periodically checks the weather and when it's about to rain in one of the locations stored in the database it sends push notifications to all device ids for that location.

So basically I need to create iOS applications to store data (I like to call these "listeners") and a application for the server which connects to a weather api and sends notifications ("controller").

My idea on the controller is still kind of vague and I don't really know how to achieve this. Is it even a good idea to create an application that runs 24/7 on the server to checks the weather and sends notifications. And if not, what would be a good way to achieve something like this?

Was it helpful?

Solution

This should be the only way to do it in my opinion. You server could check for more people per update then the app could do it self. Also by using push notification you will make sure that you app is not running in the background (this is not even possible for your kind of app) and draining the battery.

A cron job that runs every so often that calls a web page, shell script, etc.. will also do. There are many option and there is no 1 answer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top