From 9449dd267722f0f5216f569cf2815a1cc04ffefd Mon Sep 17 00:00:00 2001 From: Littlegnal <8847263+littleGnAl@users.noreply.github.com> Date: Fri, 23 Feb 2024 13:14:13 +0800 Subject: [PATCH] [example][ios] Keep screen on (#1572) On iOS low power mode, the system force keeps the screen on for 30s only, we keep the screen on to help internal testing. --- example/ios/Runner/AppDelegate.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/example/ios/Runner/AppDelegate.m b/example/ios/Runner/AppDelegate.m index 37e65c3d9..9ca7fd9e2 100644 --- a/example/ios/Runner/AppDelegate.m +++ b/example/ios/Runner/AppDelegate.m @@ -7,6 +7,10 @@ @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // On low power mode, the system force keep the screen on for 30s only, + // we keep the screen on to help internal testing. + [application setIdleTimerDisabled: YES]; + FlutterViewController* controller = (FlutterViewController*) self.window.rootViewController; FlutterMethodChannel* screensharingIOSChannel = [FlutterMethodChannel