How to organize periodic requests to the server?

I need to realize the mode (it can be turned on/off), which will be every minute to send a request to the server and get prescriptions if you need to make another query or to wait (on average a minute), and again to request instructions. Mode should work even if the user minimize the application, mainly because it will be used.

I know there is background modes, one for me (I understand) fits either background fetch or executing finite-length tasks. But the amendment, background fetch, I can set the interval query, setMinimumBackgroundFetchInterval, which guarantees no periodicities. But concerns about executing finite-length tasks that I need to run only 2-3 of the query (as understood via NSTimer), and by itself is not lengthy.

How to organize the work in the background? What should I use? Maybe I do need to run through NSURLSession, but then in what direction to dig?
July 12th 19 at 16:54
2 answers
July 12th 19 at 16:56
Solution
I question indicated that they had been reading about fashion, this app is planning to publish, so I want to find out rejected if I,for example, I will use the long task, which will be a timer for scheduled actions every minute. Intuition suggests that this is not a long task, but in fact I have the action performed for a long period of time, they are not very expensive, but nevertheless. - Shyann commented on July 12th 19 at 16:59
if you will use what is described in the official guides and as described, it is not regcnet.
more precisely, alas, can not answer (simply not faced with the need for such functionality). - Justen59 commented on July 12th 19 at 17:02
And if You are faced, as if you decided to sell? Maybe through some external means? - Shyann commented on July 12th 19 at 17:05
: googling to) - Justen59 commented on July 12th 19 at 17:08
Forums for me, this is the last step before desperation :) - Shyann commented on July 12th 19 at 17:11
welcome to the club of the desperate.
iOS in General, almost guarantees nothing in the background of the application. To it Apple quite rightly applies very jealous. I think we need to revise the architecture of the service, not to be tied to compulsory and efficiency of the client side. At least, many users simply throw the application from the task list. And this is a full stop of the application. - Erica.Buckridge commented on July 12th 19 at 17:14
: Thanks for the intelligible answer https://pp.vk.me/c631430/v631430524/5ece6/ygFKxq9T... - Shyann commented on July 12th 19 at 17:17
: For you only the VoIP mode, or go to push from the server. - hilda_Rosenbaum commented on July 12th 19 at 17:20
about pushi mean mode remote-notification - hilda_Rosenbaum commented on July 12th 19 at 17:23
: Good day, I can give remote push to Wake up the app and send requests? What is the scanning accuracy of the service for receiving remote notifications? - Shyann commented on July 12th 19 at 17:26
July 12th 19 at 16:58
Never met a Cron?

If not suitable - put the task in the script server time

If fine tuning for each client - cookie
cron on iOS is five. - Shyann commented on July 12th 19 at 17:01
Good day,
On account of the Cron, not previously used, found a bit of info which says that in iOS there is no access to cron. And this (cocoapods.org/pods/Crontab-IOS) option does not suit me.

Could You please describe in more detail the second paragraph? - Justen59 commented on July 12th 19 at 17:04
: Hello! Could You advise something? - Shyann commented on July 12th 19 at 17:07

Find more questions by tags iOSObjective-CSwiftCocoa Touch