Execution States of an Application in IOS Environment.

Today we are going to talk about the Five Execution states of an iOS app.  The iOS operating system gives you a chance to make appropriate changes during most of the transitions.

The iOS operating system manages the application state, but the application itself is responsible for managing important tasks to ensure the smooth transition between the states. You are required to respond appropriately to application state transitions. At any given moment, your application would be in one of the below five states.

Not Running —   This is the basic state where the app is not doing anything. Either the application has not started or was running and has been terminated by the system. This state is the first state when the app is just downloaded from app store.

Not Running → Inactive → Active

Inactive —  Mostly this a transitional state. An application is running in the Foreground but is not receiving any events. This could happen in case a Call or Message is received. An application could also stay in this state while in transition to a different state. Some code can run in this state but this state doesnt respond to any events or touch.

Active — This the main execution state. The app is visible on the main screen  and its running in the Foreground and receiving the events. This is the normal mode for the Foreground apps. The only way to go to or from the Active state is through the Inactive state.
Active → Inactive → Background → Suspended

Background —  This state occurs when app is moved to background. An application is running in the background and executing the code. In addition, an application being launched directly into the background enters this state instead of the inactive state.

Suspended — An application is in the background but is not executing the code. The system moves the application to this state automatically and does not notify. In case of low memory, the system may purge suspended application without notice to make free space for the foreground application. When you press the home button, or switch to another app, your app is Suspended.
Suspended → Background → Inactive → Active.

For more expertise on Android and IOS app development, please contact Purplechai.

Leave a Reply

Your email address will not be published. Required fields are marked *