From e271b23fad89e1e7da2e91a8f1e5cbb295406c74 Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Mon, 28 Oct 2024 05:23:52 -0700 Subject: [PATCH] Fixes regression of RCTWindowFrameDidChangeNotification not fired (#47236) Summary: Fixes https://github.com/facebook/react-native/issues/47234. regression from https://github.com/facebook/react-native/commit/391680fe844aad887e497912378c699aed13464b#diff-b7fda5d350ac535115fa683faa7317b43aa11f3448f95266ef9ff051c3753a6fL63 bypass-github-export-checks ## Changelog: [IOS] [FIXED] - Fixes regression of RCTWindowFrameDidChangeNotification not fired Pull Request resolved: https://github.com/facebook/react-native/pull/47236 Test Plan: Demo in https://github.com/facebook/react-native/issues/47234. Reviewed By: blakef Differential Revision: D65058105 Pulled By: cipolleschi fbshipit-source-id: 0e286182ed93f289cb853710e2e00801ef2d4f73 --- packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm index 5deab25265a..baca356003b 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm @@ -76,6 +76,7 @@ self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; UIViewController *rootViewController = [self createRootViewController]; [self setRootView:rootView toRootViewController:rootViewController]; + _window.windowScene.delegate = self; _window.rootViewController = rootViewController; [_window makeKeyAndVisible]; }