0 Replies
      Latest reply on Jan 24, 2020 12:00 PM by michael95
      michael95 Level 1 Level 1 (0 points)

        The applicationWillResignActive function in my AppDelegate.mm file does not get called as the app gets minimized while AirPlay mirroring.

         

        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:

        iPad Pro (12.9-inch) (2nd generation)

        iPad Air 2