From e2d512a1eef9950d3475c95dee8d2474a5723d74 Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Wed, 31 May 2023 16:13:05 -0700 Subject: [PATCH] Delete bridge.loadAndExecuteSplitBundleURL Summary: Changelog: [iOS][Removed] - Delete bridge.loadAndExecuteSplitBundleURL Reviewed By: cortinico Differential Revision: D46166549 fbshipit-source-id: a0854e4abcdd11542629f5f6bbce89c45e30e9cd --- packages/react-native/React/Base/RCTBridge.h | 7 ---- packages/react-native/React/Base/RCTBridge.m | 7 ---- .../React/CxxBridge/RCTCxxBridge.mm | 36 ------------------- 3 files changed, 50 deletions(-) diff --git a/packages/react-native/React/Base/RCTBridge.h b/packages/react-native/React/Base/RCTBridge.h index 2a55a8a730d33f..d863f17a7466a7 100644 --- a/packages/react-native/React/Base/RCTBridge.h +++ b/packages/react-native/React/Base/RCTBridge.h @@ -227,11 +227,4 @@ RCT_EXTERN void RCTSetTurboModuleCleanupMode(RCTTurboModuleCleanupMode mode); */ - (BOOL)isBatchActive; -/** - * Loads and executes additional bundles in the VM for development. - */ -- (void)loadAndExecuteSplitBundleURL:(NSURL *)bundleURL - onError:(RCTLoadAndExecuteErrorBlock)onError - onComplete:(dispatch_block_t)onComplete; - @end diff --git a/packages/react-native/React/Base/RCTBridge.m b/packages/react-native/React/Base/RCTBridge.m index b7eb3d7129031d..e9a521ccce0141 100644 --- a/packages/react-native/React/Base/RCTBridge.m +++ b/packages/react-native/React/Base/RCTBridge.m @@ -420,11 +420,4 @@ - (void)registerSegmentWithId:(NSUInteger)segmentId path:(NSString *)path [self.batchedBridge registerSegmentWithId:segmentId path:path]; } -- (void)loadAndExecuteSplitBundleURL:(NSURL *)bundleURL - onError:(RCTLoadAndExecuteErrorBlock)onError - onComplete:(dispatch_block_t)onComplete -{ - [self.batchedBridge loadAndExecuteSplitBundleURL:bundleURL onError:onError onComplete:onComplete]; -} - @end diff --git a/packages/react-native/React/CxxBridge/RCTCxxBridge.mm b/packages/react-native/React/CxxBridge/RCTCxxBridge.mm index 2d11205b006d36..a23413895768c1 100644 --- a/packages/react-native/React/CxxBridge/RCTCxxBridge.mm +++ b/packages/react-native/React/CxxBridge/RCTCxxBridge.mm @@ -1089,42 +1089,6 @@ - (void)executeSourceCode:(NSData *)sourceCode withSourceURL:(NSURL *)url sync:( [self.devSettings setupHMRClientWithBundleURL:self.bundleURL]; } -#if RCT_DEV_MENU | RCT_PACKAGER_LOADING_FUNCTIONALITY -- (void)loadAndExecuteSplitBundleURL:(NSURL *)bundleURL - onError:(RCTLoadAndExecuteErrorBlock)onError - onComplete:(dispatch_block_t)onComplete -{ - __weak __typeof(self) weakSelf = self; - [RCTJavaScriptLoader loadBundleAtURL:bundleURL - onProgress:^(RCTLoadingProgress *progressData) { -#if (RCT_DEV_MENU | RCT_DEV_MENU) && __has_include() - id loadingView = [weakSelf moduleForName:@"DevLoadingView" - lazilyLoadIfNecessary:YES]; - [loadingView updateProgress:progressData]; -#endif - } - onComplete:^(NSError *error, RCTSource *source) { - if (error) { - onError(error); - return; - } - - [self enqueueApplicationScript:source.data - url:source.url - onComplete:^{ - [self.devSettings setupHMRClientWithAdditionalBundleURL:source.url]; - onComplete(); - }]; - }]; -} -#else -- (void)loadAndExecuteSplitBundleURL:(NSURL *)bundleURL - onError:(RCTLoadAndExecuteErrorBlock)onError - onComplete:(dispatch_block_t)onComplete -{ -} -#endif - - (void)handleError:(NSError *)error { // This is generally called when the infrastructure throws an