diff --git a/packages/mobile/ios/App/App/AppDelegate.swift b/packages/mobile/ios/App/App/AppDelegate.swift index 9bcc459e..91ac5b2d 100644 --- a/packages/mobile/ios/App/App/AppDelegate.swift +++ b/packages/mobile/ios/App/App/AppDelegate.swift @@ -146,8 +146,14 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { webView.backgroundColor = .clear webView.scrollView.backgroundColor = .clear if #available(iOS 26.0, *) { + // KVC keeps this compiling with pre-26 SDKs, but the effect object is a + // UIScrollEdgeEffect — NOT a UIView — so it must be handled as a plain + // NSObject ("hidden" is the ObjC key behind isHidden). The previous + // `as? UIView` cast silently returned nil and left the system's dark + // edge band visible behind the status bar. for key in ["topEdgeEffect", "bottomEdgeEffect"] { - (webView.scrollView.value(forKey: key) as? UIView)?.isHidden = true + guard webView.scrollView.responds(to: NSSelectorFromString(key)) else { continue } + (webView.scrollView.value(forKey: key) as? NSObject)?.setValue(true, forKey: "hidden") } } }