According to the Technical Q&A QA1561 any way of exiting the app is not recommended. The appropriate way is to allow the user to exit the app on their own, without forcing exit or aborting the app's execution.
However, the Microsoft Teams iOS App somehow manages not only to avoid the crash but gracefully exit with animation, similar to pressing the "Home" button on the device.
Video recording or programmatic exit in the MS Teams iOS app
Please note, that no home button has been pressed in the aforementioned example. The app performed animated exit programmatically
- Is this a documented feature of iOS? Or are the developers of MS Teams using some sort of the Private API?
- In any case, how can I exit an app programmatically with animation, so it wouldn't appear as a crash?
How to reproduce this behavior on your device:
- Download the MS Teams app
- Sign in
- Change the theme in the settings from "Dark" to "Light" or vice versa and click "Relaunch". Observe, how the app quits with animation.