Is it possible that my closed app launch code in iOS?

Say my application in iOS is closed. Is it possible to configure it to execute a piece of code after a certain period of time?

+4
source share
3 answers

You may have a push notifications application schedule, but you cannot schedule it to run certain code if it doesn't work.

+4
source

Short answer: no, you cannot. At best, your application will run in the background for 11 minutes if you request extra time (check the documentation for beginBackgroundTaskWithExpirationHandler in the UIApplication class). There are several things you can do: schedule a local notification that the user can use to launch the application, or use push notifications to remind the user of something he needs to know.

+1
source

iOS allows background processing for the following reasons: - location-dependent functionality - background sound playback - voip

Learn more about Apple's multitasking documentation.

0
source

Source: https://habr.com/ru/post/1387672/


All Articles