I
I
Ilya2019-06-27 13:57:58
iOS
Ilya, 2019-06-27 13:57:58

How to implement a background task when the application is turned off?

Hello. There was a need to implement a background task.
The purpose of the function is to check the presence of elements in the array. If there is something there, send a notification.
Tried via:

DispatchQueue.background(delay: 10.0, completion:{ функция })

The function sends a request to the server, i.e. makes BackgroundFetch checks the array if there are elements and sends notifications. But the function stops working if the application is turned off.
Tell me how to implement a background task when the application is turned off completely.
Maybe there is some material on this topic.
At the moment I can only implement local notifications. I can't send notifications from the server.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
doublench21, 2019-06-27
@doublench21

IT IS FORBIDDEN! And quite correctly, if I closed the application, I must be sure that it will not work from the word at all, otherwise this is already some kind of Bucket coming out.
BackgroundFetching is only about a minimized application.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question