From f85cca0ee54bf28fd124a937b57c3263fc6a9f6a Mon Sep 17 00:00:00 2001 From: Henry Garant Date: Fri, 21 Feb 2025 10:56:37 -0800 Subject: [PATCH] Back out D69855097 & D69874923 to unblock Twilight headset pairing/discovery (#49600) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/49600 changelog: [internal] # Context Recent reports of unable to pair or connect to headsets in the Twilight app started ~1 day ago. I used a bisect to narrow down the range of changes https://www.internalfb.com/mobile-bisect/Bi653128483872339, which lead to [changelog](https://www.internalfb.com/intern/changelog/?search=%7B%22key%22%3A%22AND%22%2C%22children%22%3A[%7B%22key%22%3A%22buck_target_is%22%2C%22field%22%3A%22buck_target%22%2C%22value%22%3A%22%2F%2Ffbobjc%2FApps%2FOculus%2FTwilight%3ATwilight%22%7D%2C%7B%22key%22%3A%22branch_first%22%2C%22field%22%3A%22branch%22%2C%22value%22%3A%22master%22%7D%2C%7B%22key%22%3A%22revision_first%22%2C%22field%22%3A%22revision%22%2C%22value%22%3A%22e835199c51fd1b55c3c13c5504f9b5527e201b41%22%7D%2C%7B%22key%22%3A%22branch_last%22%2C%22field%22%3A%22branch%22%2C%22value%22%3A%22master%22%7D%2C%7B%22key%22%3A%22revision_last%22%2C%22field%22%3A%22revision%22%2C%22value%22%3A%22d19e5a6cd5949d65aee30f7e8ce185979b7448af%22%7D]%7D) From there I continued until I found the threshold D69855097 (bad) and D69803512 (good). I tried a direct revert of D69855097 but the changes we spread across another diff D69874923. Reverting the stack of these gets us to here. Could use help understanding what's going on. Reviewed By: sammy-SC Differential Revision: D69987736 fbshipit-source-id: f9d16a460112374f163d235dc3e576d7ad506ebf --- packages/react-native/React/Fabric/Surface/RCTFabricSurface.mm | 2 -- .../react/runtime/platform/ios/ReactCommon/RCTHost.mm | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/React/Fabric/Surface/RCTFabricSurface.mm b/packages/react-native/React/Fabric/Surface/RCTFabricSurface.mm index 15a1173a324..3906df778bc 100644 --- a/packages/react-native/React/Fabric/Surface/RCTFabricSurface.mm +++ b/packages/react-native/React/Fabric/Surface/RCTFabricSurface.mm @@ -14,7 +14,6 @@ #import #import #import -#import #import #import #import @@ -55,7 +54,6 @@ using namespace facebook::react; initialProperties:(NSDictionary *)initialProperties { if (self = [super init]) { - RCTInitializeUIKitProxies(); _surfacePresenter = surfacePresenter; _surfaceHandler = diff --git a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm index 974a37b31e7..24616334d34 100644 --- a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm +++ b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm @@ -12,6 +12,7 @@ #import #import #import +#import #import #import #import @@ -248,6 +249,7 @@ class RCTHostHostTargetDelegate : public facebook::react::jsinspector_modern::Ho mode:(DisplayMode)displayMode initialProperties:(NSDictionary *)properties { + RCTInitializeUIKitProxies(); RCTFabricSurface *surface = [[RCTFabricSurface alloc] initWithSurfacePresenter:self.surfacePresenter moduleName:moduleName initialProperties:properties];