Saturday, February 26, 2022

Describe application states in iOS and also app lifecycle?

Ans:

Application States:

1. Not running
2. Inactive
3. Active
4. Background
5. Suspended


1. Not running:
Application is not yet all start by system or system also terminate app and move to not running state.

2. Inactive:
Application is in foreground but not receiving any events from the app.
Ex: Phone call, Message or Notification is received by system.

3. Active:
Application is in foreground and also receiving events from app.
This is normal state of an application.

4. Background:
Application is in background and also executing the code.

5. Suspended:
Application is in background. but not executing the code.



Application Lifecycle Methods:

1. application:WillFinishLanuch:WithOptions
2. application:DidFinishLanuch:WithOptions
3. application:WillEnterForeground:
4. application:DidBecomeActive
5. application:WillResignActive
6. application:DidEnterBackground
7. application:WillTerminate

No comments:

Post a Comment