From b850ccdd0f4a1e0d805c8d84aeb54770bcea0b02 Mon Sep 17 00:00:00 2001 From: Kudo Chien Date: Wed, 10 Apr 2024 23:38:33 +0800 Subject: [PATCH] add launchOptions --- .../react-native/Libraries/AppDelegate/RCTRootViewFactory.h | 2 +- .../react-native/Libraries/AppDelegate/RCTRootViewFactory.mm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h index c8f946c7a50877..fe4c7212528e5e 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h +++ b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.h @@ -172,7 +172,7 @@ typedef BOOL (^RCTBridgeDidNotFindModuleBlock)(RCTBridge *bridge, NSString *modu #pragma mark - RCTRootViewFactory Helpers -- (RCTHost *)createReactHost; +- (RCTHost *)createReactHost:(NSDictionary *)launchOptions; @end diff --git a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm index 48bc46c2839b0b..bf5dc737729097 100644 --- a/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm +++ b/packages/react-native/Libraries/AppDelegate/RCTRootViewFactory.mm @@ -225,10 +225,10 @@ - (void)createReactHostIfNeeded:(NSDictionary *)launchOptions if (self.reactHost) { return; } - self.reactHost = [self createReactHost]; + self.reactHost = [self createReactHost:launchOptions]; } -- (RCTHost *)createReactHost +- (RCTHost *)createReactHost:(NSDictionary *)launchOptions { __weak __typeof(self) weakSelf = self; RCTHost *reactHost = [[RCTHost alloc] initWithBundleURLProvider:self->_configuration.bundleURLBlock