diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm index c791cf2861..daae40eb5e 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm @@ -852,7 +852,11 @@ static void SetEntryPoint(flutter::Settings* settings, NSString* entrypoint, NSS ); // Disable GPU if the app or scene is running in the background. - self.isGpuDisabled = self.viewController.stateIsBackground; + self.isGpuDisabled = self.viewController + ? self.viewController.stateIsBackground + : FlutterSharedApplication.application && + FlutterSharedApplication.application.applicationState == + UIApplicationStateBackground; // Create the shell. This is a blocking operation. std::unique_ptr shell = flutter::Shell::Create(