Refer to the "Applications and Application Multitasking" section of the IOS Application Programming Guide. Find this by searching the Xcode documentation with the phrase “Application Status and Multitasking” and “Hits Must” set to “Match Search Term.” Another useful search phrase: "Background execution."
The consolidated answer is that the application can continue to "execute" in the background an unlimited number of times for a limited number of reasons:
in iOS, only certain types of applications are allowed to run in the background:
- Applications that play audio content for the user in the background, for example, an application for a music player.
- Applications that inform users of their location at any time, such as a navigation application
- Voice over Internet Protocol (VoIP) Applications
- Press applications to download and process new content.
- Applications regularly receiving updates from external accessories
In addition to these specific operations, the application may ask you to continue execution for a very short time, which is contained in the documentation for the section "Performing a task of finite length in the background." After a short time, your application will inform the system that it is done (and then suspended), or it is forcibly terminated. Details in the document.
Another useful bit of this document with good state diagrams is the "Managing Application State Changes" section. This section talks about becoming a thing of the past and coming back to the fore. He should answer your question about the difference between the starting light and the beginning from a paused state. The short (not entirely correct) answer is that if you start with a paused state and do not take any special actions when entering the background or (re) entering the foreground, you simply continue more or less from where you were, In addition, starting from a paused state is faster. Read the document as it says it is much better than my paraphrase.
source share