From 016bb24eac5b361db283c24c9f9e11f2e36af2a8 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Fri, 5 Jan 2024 11:54:30 -0800 Subject: [PATCH] Remove deprecated RCTBundleURLProvider options (#42114) Summary: https://github.com/facebook/react-native/commit/f7219ec02d71d2f0f6c71af4d5c3d4850a898fd8 deprecated some of the methods in `RCTBundleURLProvider, and is part of React Native version 0.73. Let's remove the deprecated options for React Native 0.74+ bypass-github-export-checks ## Changelog: [IOS] [REMOVED] - Remove deprecated RCTBundleURLProvider options Pull Request resolved: https://github.com/facebook/react-native/pull/42114 Test Plan: CI should pass. Reviewed By: huntie Differential Revision: D52537732 Pulled By: cipolleschi fbshipit-source-id: ea5d17c7c66a60bceb2a12f2e17e39be4c56d422 --- .../React/Base/RCTBundleURLProvider.h | 18 +--------- .../React/Base/RCTBundleURLProvider.mm | 34 ------------------- 2 files changed, 1 insertion(+), 51 deletions(-) diff --git a/packages/react-native/React/Base/RCTBundleURLProvider.h b/packages/react-native/React/Base/RCTBundleURLProvider.h index efe1bd632aa..bd627816167 100644 --- a/packages/react-native/React/Base/RCTBundleURLProvider.h +++ b/packages/react-native/React/Base/RCTBundleURLProvider.h @@ -119,27 +119,11 @@ RCT_EXTERN void RCTBundleURLProviderAllowPackagerServerAccess(BOOL allowed); * - enableDev: Whether to keep or remove `__DEV__` blocks from the bundle. * - enableMinification: Enables or disables minification. Usually production bundles are minified and development * bundles are not. + * - inlineSourceMap: When true, the bundler will inline the source map in the bundle * - modulesOnly: When true, will only send module definitions without polyfills and without the require-runtime. * - runModule: When true, will run the main module after defining all modules. This is used in the main bundle but not * in split bundles. */ -+ (NSURL *)jsBundleURLForBundleRoot:(NSString *)bundleRoot - packagerHost:(NSString *)packagerHost - enableDev:(BOOL)enableDev - enableMinification:(BOOL)enableMinification - __deprecated_msg( - "Use `jsBundleURLForBundleRoot:packagerHost:enableDev:enableMinification:inlineSourceMap:` instead"); - -+ (NSURL *)jsBundleURLForBundleRoot:(NSString *)bundleRoot - packagerHost:(NSString *)packagerHost - packagerScheme:(NSString *)scheme - enableDev:(BOOL)enableDev - enableMinification:(BOOL)enableMinification - modulesOnly:(BOOL)modulesOnly - runModule:(BOOL)runModule - __deprecated_msg( - "Use jsBundleURLForBundleRoot:packagerHost:enableDev:enableMinification:inlineSourceMap:modulesOnly:runModule:` instead"); - + (NSURL *)jsBundleURLForBundleRoot:(NSString *)bundleRoot packagerHost:(NSString *)packagerHost enableDev:(BOOL)enableDev diff --git a/packages/react-native/React/Base/RCTBundleURLProvider.mm b/packages/react-native/React/Base/RCTBundleURLProvider.mm index aa8753376e1..596706da3be 100644 --- a/packages/react-native/React/Base/RCTBundleURLProvider.mm +++ b/packages/react-native/React/Base/RCTBundleURLProvider.mm @@ -245,27 +245,11 @@ static NSURL *serverRootWithHostPort(NSString *hostPort, NSString *scheme) queryItems:nil]; } -+ (NSURL *)jsBundleURLForBundleRoot:(NSString *)bundleRoot - packagerHost:(NSString *)packagerHost - enableDev:(BOOL)enableDev - enableMinification:(BOOL)enableMinification -{ - return [self jsBundleURLForBundleRoot:bundleRoot - packagerHost:packagerHost - packagerScheme:nil - enableDev:enableDev - enableMinification:enableMinification - inlineSourceMap:NO - modulesOnly:NO - runModule:YES]; -} - + (NSURL *)jsBundleURLForBundleRoot:(NSString *)bundleRoot packagerHost:(NSString *)packagerHost enableDev:(BOOL)enableDev enableMinification:(BOOL)enableMinification inlineSourceMap:(BOOL)inlineSourceMap - { return [self jsBundleURLForBundleRoot:bundleRoot packagerHost:packagerHost @@ -277,24 +261,6 @@ static NSURL *serverRootWithHostPort(NSString *hostPort, NSString *scheme) runModule:YES]; } -+ (NSURL *)jsBundleURLForBundleRoot:(NSString *)bundleRoot - packagerHost:(NSString *)packagerHost - packagerScheme:(NSString *)scheme - enableDev:(BOOL)enableDev - enableMinification:(BOOL)enableMinification - modulesOnly:(BOOL)modulesOnly - runModule:(BOOL)runModule -{ - return [self jsBundleURLForBundleRoot:bundleRoot - packagerHost:packagerHost - packagerScheme:nil - enableDev:enableDev - enableMinification:enableMinification - inlineSourceMap:NO - modulesOnly:modulesOnly - runModule:runModule]; -} - + (NSURL *)jsBundleURLForBundleRoot:(NSString *)bundleRoot packagerHost:(NSString *)packagerHost packagerScheme:(NSString *)scheme