The code of my AppDelegate.mm file looks like this:
- (void)applicationWillResignActive:(UIApplication *)application
// Code to pause game
- (void)applicationDidBecomeActive:(UIApplication *)application
// Code to resume game
Interestingly, while applicationWillResignActive doesn't get called when the app is minized while AirPlay mirroring, BOTH the applicationWillResignActive function AND applicationDidBecomeActive function get called when the app is selected from the home screen.
When AirPlay mirroring is not occuring, these functions get called as expected.
Turing off AirPlay mirroring while the app is out of focus does not result in any AppDelegate.mm functions getting called.
I'm building my application with the iOS 13.1 SDK in Xcode 12.2.1.
The iPads I'm running my application on are on iOS 13.2.2: