@@ -52,10 +52,11 @@ + (void)initialize
5252 Host initialization should not be resource intensive. A host may be created before any intention of using React Native
5353 has been expressed.
5454 */
55- - (instancetype )initWithHostDelegate : (id <RCTHostDelegate>)hostDelegate
56- turboModuleManagerDelegate : (id <RCTTurboModuleManagerDelegate>)turboModuleManagerDelegate
57- bindingsInstallFunc : (facebook::react::ReactInstance::BindingsInstallFunc)bindingsInstallFunc
58- jsEngineProvider : (RCTHostJSEngineProvider)jsEngineProvider
55+ - (instancetype )initWithBundleURL : (NSURL *)bundleURL
56+ hostDelegate : (id <RCTHostDelegate>)hostDelegate
57+ turboModuleManagerDelegate : (id <RCTTurboModuleManagerDelegate>)turboModuleManagerDelegate
58+ bindingsInstallFunc : (facebook::react::ReactInstance::BindingsInstallFunc)bindingsInstallFunc
59+ jsEngineProvider : (RCTHostJSEngineProvider)jsEngineProvider
5960{
6061 if (self = [super init ]) {
6162 _hostDelegate = hostDelegate;
@@ -78,7 +79,7 @@ - (instancetype)initWithHostDelegate:(id<RCTHostDelegate>)hostDelegate
7879 return strongSelf->_bundleURL ;
7980 };
8081
81- auto bundleURLSetter = ^(NSURL *bundleURL ) {
82+ auto bundleURLSetter = ^(NSURL *bundleURL_ ) {
8283 [weakSelf _setBundleURL: bundleURL];
8384 };
8485
@@ -92,6 +93,7 @@ - (instancetype)initWithHostDelegate:(id<RCTHostDelegate>)hostDelegate
9293 return [strongSelf->_hostDelegate getBundleURL ];
9394 };
9495
96+ [self _setBundleURL: bundleURL];
9597 [_bundleManager setBridgelessBundleURLGetter: bundleURLGetter
9698 andSetter: bundleURLSetter
9799 andDefaultGetter: defaultBundleURLGetter];
@@ -140,7 +142,6 @@ - (void)start
140142 @" RCTHost should not be creating a new instance if one already exists. This implies there is a bug with how/when this method is being called." );
141143 [_instance invalidate ];
142144 }
143- [self _setBundleURL: [_hostDelegate getBundleURL ]];
144145 _instance = [[RCTInstance alloc ] initWithDelegate: self
145146 jsEngineInstance: [self _provideJSEngine ]
146147 bundleManager: _bundleManager
0 commit comments