Is it possible to do this in iOS8 + ?

An application in the background once at a certain time (30 minutes, for example) downloads an xml file from the server, parses it, and, if necessary, gives the user a message with text and an OK button .

Is this possible to do?

I know that it is possible to show notification in the status bar without any problems, but it is not necessary. Yes, and at the expense of backgranund not sure what you can do this. In Android, you can do it all without any problems.

    1 answer 1

    Technically, this can be done ( here is the manual ), but you shouldn’t do it by your mind. Why eat battery / traffic, do not let the phone fall asleep and download a file every half an hour, which with some probability has not changed in any way, if you can do this:

    • there is a server that either knows that something has happened and changed, because it is your server on which your XML file is formed, or stupidly checks the status of the XML file if it is not your file, but someone else’s, on a foreign server.

    • as soon as the server has detected a file change, it sends a push message to your application on the phone, which sleeps quietly. iOS will wake up the application, give it information from the Push Message, the application will download the required file. If necessary, it can show Notification (in a bar, on an icon, etc.), but it can also not show.

    • Thank you very much for your answer! The method that you suggested would be better) I'll try to use it! - researcher
    • And about the notification, is it possible to issue a message with text and an OK button, after clicking on which the user will go to a specific screen in the application? - researcher
    • Did any application on iOS (or Android) give you such notifications? OUTSIDE the application is impossible. You can show different things in the notification bar, you can show the "red circle", but to put the alert "Ay-ah-ah, click button, yes?" can only the OS itself. So the user will have to react to a familiar, calm notification, after which you can open the app and already there you can throw it with any number of dialogs, buttons and what you have there in the arsenal. - Sergey Snegirev
    • the same application for Android issues a notification by type: osamashabrez.com/assets/default-Alertdialog.png - researcher
    • But it is not quite simply realized. In fact, it is not an alert that is called from the background, but an activation, which is generally a common thing. And this activi has the appearance of an ordinary alert dialog :) - researcher