diff --git a/packages/react-native/React/CoreModules/RCTPerfMonitor.mm b/packages/react-native/React/CoreModules/RCTPerfMonitor.mm index 023a5311db2e53..776b5e77083a68 100644 --- a/packages/react-native/React/CoreModules/RCTPerfMonitor.mm +++ b/packages/react-native/React/CoreModules/RCTPerfMonitor.mm @@ -298,7 +298,8 @@ - (void)show [self updateStats]; - [RCTKeyWindow() addSubview:self.container]; + UIWindow *window = RCTSharedApplication().delegate.window; + [window addSubview:self.container]; _uiDisplayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(threadUpdate:)]; [_uiDisplayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes]; diff --git a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm index ddeb1e9eff9437..35b5bd848d280d 100644 --- a/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +++ b/packages/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm @@ -181,6 +181,13 @@ - (void)registerSegmentWithId:(NSNumber *)segmentId path:(NSString *)path #pragma mark - RCTTurboModuleManagerDelegate +- (NSArray> *)extraModulesForBridge:(RCTBridge *)bridge { + if ([_appTMMDelegate respondsToSelector:@selector(extraModulesForBridge:)]) { + return [_appTMMDelegate extraModulesForBridge:bridge]; + } + return @[]; +} + - (Class)getModuleClassFromName:(const char *)name { if ([_appTMMDelegate respondsToSelector:@selector(getModuleClassFromName:)]) {