If you aren't that into Android, there's something called a "background-service" for the applications in that OS. Which basically gives the developer a opportunity to make some background tasks without forcing the application to be in foreground.
So are there something like this in iOS? (Version 5 and newer) What I basically want to do is to call a API and fetch some JSON data every minute, then parse the result and then present a local notification banner to the user depending on the result that were fetched from the HTTP request. I hardly believe that this shouldn't be possible in iOS, but I haven't found anything like this yet.
- Call the API once every minute and fetch some JSON data.
- Parse the JSON data into and add some logic to handle the data.
- If a local notification should be presented or not, depends on the result from the request.
Copyright Notice:Content Author:「parek」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/15620009/http-request-as-background-task-with-local-notifications-in-ios