I've found that, in iOS 13 (Have tested 13.0 and 13.5), the UIApplicationDelegate:applicationWillTerminate and the UIWindowSceneDelegate:sceneDidDisconnect methods, when the application is dismissed from the app switcher:
What is the reliable way to do some cleanup when the app (or final scene) is dismissed from the app switcher?
Here is a related question and answer from StackOverflow: https://stackoverflow.com/questions/58573015/in-ios-13-what-events-do-i-get-when-the-user-swipes-my-app-up-in-the-app-switch/58573016#58573016
are called when the app was active upon invoking the switcher
are not called when the app was in background upon invoking the switcher
What is the reliable way to do some cleanup when the app (or final scene) is dismissed from the app switcher?
Here is a related question and answer from StackOverflow: https://stackoverflow.com/questions/58573015/in-ios-13-what-events-do-i-get-when-the-user-swipes-my-app-up-in-the-app-switch/58573016#58573016