From 31d49c31d938602bacc995372a27ff07a1bafa50 Mon Sep 17 00:00:00 2001 From: Aliaksandr Babrykovich Date: Fri, 20 Feb 2026 11:35:24 +0100 Subject: [PATCH] fix(ios): reload sandbox when jsBundleSource prop changes RCTHost is initialized with a bundleURLProvider closure that calls the delegate's bundleURL on every reload. Trigger host reload instead of recreating the entire factory to pick up the new bundle URL. Co-authored-by: Cursor --- .../ios/SandboxReactNativeViewComponentView.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/react-native-sandbox/ios/SandboxReactNativeViewComponentView.mm b/packages/react-native-sandbox/ios/SandboxReactNativeViewComponentView.mm index e331077..9c22f93 100644 --- a/packages/react-native-sandbox/ios/SandboxReactNativeViewComponentView.mm +++ b/packages/react-native-sandbox/ios/SandboxReactNativeViewComponentView.mm @@ -9,6 +9,7 @@ #import #import #import +#import #import #import "SandboxReactNativeDelegate.h" @@ -74,6 +75,10 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & if (oldViewProps.jsBundleSource != newViewProps.jsBundleSource) { [self.reactNativeDelegate setJsBundleSource:newViewProps.jsBundleSource]; + RCTHost *host = self.reactNativeFactory.rootViewFactory.reactHost; + if (host) { + [host reload]; + } } if (oldViewProps.allowedTurboModules != newViewProps.allowedTurboModules) {