Skip to content

Commit 4f433de

Browse files
committed
Forward host:didInitializeRuntime: callback to user delegate
RCTReactNativeFactory acts as RCTHost's delegate but did not implement host:didInitializeRuntime:, causing the optional callback to never reach the user's RCTReactNativeFactoryDelegate. Add the missing forwarding method following the same pattern as hostDidStart: so the runtime reference is properly delivered to the user delegate. Changelog: [IOS] [FIXED] - Forward host:didInitializeRuntime: callback to user delegate in RCTReactNativeFactory
1 parent e04ff69 commit 4f433de

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

packages/react-native/Libraries/AppDelegate/RCTReactNativeFactory.mm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,13 @@ - (void)hostDidStart:(RCTHost *)host
212212
}
213213
}
214214

215+
- (void)host:(RCTHost *)host didInitializeRuntime:(facebook::jsi::Runtime &)runtime
216+
{
217+
if ([_delegate respondsToSelector:@selector(host:didInitializeRuntime:)]) {
218+
[_delegate host:host didInitializeRuntime:runtime];
219+
}
220+
}
221+
215222
- (NSArray<NSString *> *)unstableModulesRequiringMainQueueSetup
216223
{
217224
#if RN_DISABLE_OSS_PLUGIN_HEADER

0 commit comments

Comments
 (0)