Application life cycle in iOS

The application life cycle constitutes the sequence of events that occurs between the launch and termination of application.

It is very important to understand for all the iOS Developers, who wants smooth user experience.

Execution States for Apps

Flow of app life cycle from launch to suspended states

The Main Run Loop:

Interview Questions on App life cycle

1/ How background iOS app gets resumed in foreground?

When user launches an app that is currently in background, the system moves app to the inactive state and then to the active state.

2/ What are the steps involved when app enter to foreground after device rebooted?

When user launches an app for the first time or after device reboot or after system terminate the app, the system moves app to the active state.

3/ What are the steps involved when app moves from foreground to background?

4/ How can you opt out background execution?

5/ Which is the app state when device is rebooted?

6/ When app is running but not receiving event. In which state app is in?

7/ How an iOS app responds to interrupts like SMS, Incoming Call, Calendar, etc.?

Application moves to the inactive state temporarily and it remains in this state until the user decides whether to accept or ignore the interruption.

8/ What are the uses of background state?

9/ How can you add additional background execution time for your app?

10/ How can you check maximum amount of time available for app in background?

11/ How can you debug your background task?

Conclusion

I hope, above tutorial will help to clear the concepts of application lifecycle.

Reference: https://manasaprema04.medium.com/application-life-cycle-in-ios-f7365d8c1636