It's important to manage the termination of an app so that it exits correctly.
The app life cycle comes to an end when the app is terminated. This transition causes the app to move from the thumbnail state to the invisible state. Since your app can be terminated manually by the user or automatically by the OS due to a critical condition, you need to manage this transition properly.
These are the navigator events sent when an application is terminated:
The following diagram shows the events that are received when the app is
terminated:
Your code needs to handle the reception of each of the above events and must respond properly to each of them. For more information regarding each of these events, see Various States and BPS Navigator Events sections.