I have an app where I clean up some UI when the app moves to the background. The notification of the app moving to the background occurs if, for example, on the iPad, the user swipes up to invoke the task switcher. However, the app continues to operate while the task switcher is open. How can I distinguish this from the app moving to background and not visible in the task switcher? Interestingly, if I launch the app from Xcode, the app does not continue in the task switcher. However, if it's not connected to Xcode, it continues.
For debugging purposes, I've linked the app delegate to the main view controller so I can send messages for display when the app delegate receives calls. I did this because the behavior doesn't happen when connected to Xcode, so a print will not work. I haven't found a method or notification yet that indicates this state.