What is iOS App Life Cycle ?
- When App run then iOS System goes through a set of states, these states are knowns as sates of the app’s lifecycle.

Here we discuss more details related to Application states.
1- Not running State: - The App is said to not running state when application-
a) has not been launched.
Or
b) Was running but terminated by the system.
2- Inactive State:- The App is said to inactive state when the application-
a) The App is running in the foreground but currently not receiving any events. An app usually stays in this state only sometimes as it transitions to another state.
3- Active State:- The App is said to active state when the applications-a) The app is running in the foreground and is receiving events. This is the normal mode for foreground apps.
4- Background State:- The App is said to Background State when the applications-
a) When an app is in the Background state, its user interface isn’t visible, but it is running some block of code. But Most of the app transition through this state on their way to being suspended
5- Suspended State:- The App is said to Background State when the applications-
a) The app is in the background but is not executing code. The system moves apps to this state automatically and does not notify them before doing so. While suspended, an app remains in memory but does not execute any code.
b) When a low-memory condition occurs, the system may purge suspended apps without notice to make more space for the foreground app.
Most transitions state call corresponding Delegate methods in Application -
- Most state transitions are accompanied by a corresponding call to the methods of your app delegate object. These methods are your chance to respond to state changes in an appropriate way. These methods are listed below, along with a summary of how you might use them.
• application:willFinishLaunchingWithOptions:—This method is your app’s first chance to execute code at launch time.
• application:didFinishLaunchingWithOptions:—This method allows you to perform any final initialization before your app is displayed to the user.
• applicationDidBecomeActive:—Lets your app know that it is about to become the foreground app. Use this method for any last minute preparation.
• applicationWillResignActive:—Lets you know that your app is transitioning away from being the foreground app. Use this method to put your app into a quiescent state.
• applicationDidEnterBackground:—Lets you know that your app is now running in the background and maybe suspended at any time.
• applicationWillEnterForeground:—Lets you know that your app is moving out of the background and back into the foreground, but that it is not yet active.
• applicationWillTerminate:—Lets you know that your app is being terminated. This method is not called if your app is suspended.
Comments
Post a Comment