I'm a bit confused with one transition shown on official Apple lifecycle figure. This Suspended -> Inactive
transition looks weird to me. I mean how the app can skip the Background
state. The only way for the app to get to the Suspended
state is through Background
. So, whenever you go back to the app it should still be in a Background
state for a while until it receives applicationDidEnterForeground
delegate event. So, how the app can get directly to Inactive
state omitting Background
? Suspended <-> Background -> Inactive
seems to be the only valid transition. This transition covers all the cases e.g. background fetch when the app goes to Background
performs fetch and then goes back to Suspended
as well as the regular awaking of the app where the app goes from Suspended
to Background
and then to Inactive
, but for some reason there is this extract transition. Can somebody explain why it is here? Thanks!
Update 1. Maybe this is just added to indicate the regular awaking of the app ? I mean without the background fetch and other stuff where the app is awaked by the os directly in background mode to perform some operations. Maybe this is just the "shortened" way to show what happens when the user just normally returns to the app?

- 361
- 1
- 10
2 Answers
Look at the diagram carefully. "Not running" is the state where your app hasn't even been launched. When you tap on the app icon, it goes to the inactive state and shows to the Launch Screen UI. This transition only happens once in the life cycle, immediately after the app is launched.
The app then goes automatically to the "Active" state. It can't go back to the launch screen, and there is no way to put the app in the background when it's still on the launch screen; you have to go to the "active" state once.

- 51,477
- 5
- 75
- 98
-
yes, but my question is not about this! It is about the transaction that I filled with red color , the direct transaction from suspended to inactive – starwarrior8809 Sep 08 '20 at 22:46
As you suggest, this transition represents when a suspended app is opened by the user by tapping its icon or a notification, for example. The app is no longer suspended, but it is not yet active (didBecomeActive
has not been called), so it is inactive. This is a transitionary state.

- 108,386
- 14
- 159
- 186