문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top