From 6fe2757f3e2bda9e0939837d1da91dae0cfabacf Mon Sep 17 00:00:00 2001 From: Olgierd Date: Thu, 5 Nov 2026 13:16:32 +0100 Subject: [PATCH] Stop covering the UI with the boot splash when the app only goes inactive on iOS --- ios/AppDelegate.swift | 2 +- ios/SceneDelegate.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/AppDelegate.swift b/ios/AppDelegate.swift index 14bd2fe3a401..0ddcaef5cd9f 100644 --- a/ios/AppDelegate.swift +++ b/ios/AppDelegate.swift @@ -106,7 +106,7 @@ class AppDelegate: ExpoAppDelegate, UNUserNotificationCenterDelegate { } // Cover the UI before the OS captures the app-switcher snapshot, so sensitive data never ends up on disk. - // Called by `SceneDelegate`, UIKit doesn't send the app-level active/resign callbacks under the scene lifecycle. + // Called by `SceneDelegate` on background/foreground, UIKit doesn't send the app-level callbacks under the scene lifecycle. func showPrivacyOverlay() { guard privacyOverlay == nil, let window else { return diff --git a/ios/SceneDelegate.swift b/ios/SceneDelegate.swift index fea87afd2683..9e844e7c4438 100644 --- a/ios/SceneDelegate.swift +++ b/ios/SceneDelegate.swift @@ -71,11 +71,11 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { forward(userActivity: userActivity) } - func sceneWillResignActive(_ scene: UIScene) { + func sceneDidEnterBackground(_ scene: UIScene) { appDelegate?.showPrivacyOverlay() } - func sceneDidBecomeActive(_ scene: UIScene) { + func sceneWillEnterForeground(_ scene: UIScene) { appDelegate?.hidePrivacyOverlay() }