diff --git a/packages/react-native/React/Base/RCTBundleURLProvider.mm b/packages/react-native/React/Base/RCTBundleURLProvider.mm index e27846cf606..808925dd08c 100644 --- a/packages/react-native/React/Base/RCTBundleURLProvider.mm +++ b/packages/react-native/React/Base/RCTBundleURLProvider.mm @@ -19,7 +19,7 @@ const NSUInteger kRCTBundleURLProviderDefaultPort = RCT_METRO_PORT; -#if RCT_DEV | RCT_PACKAGER_LOADING_FUNCTIONALITY +#if RCT_DEV_MENU | RCT_PACKAGER_LOADING_FUNCTIONALITY static BOOL kRCTAllowPackagerAccess = YES; void RCTBundleURLProviderAllowPackagerServerAccess(BOOL allowed) { @@ -81,7 +81,7 @@ - (void)resetToDefaults (unsigned long)kRCTBundleURLProviderDefaultPort]]; } -#if RCT_DEV | RCT_PACKAGER_LOADING_FUNCTIONALITY +#if RCT_DEV_MENU | RCT_PACKAGER_LOADING_FUNCTIONALITY + (BOOL)isPackagerRunning:(NSString *)hostPort { return [RCTBundleURLProvider isPackagerRunning:hostPort scheme:nil]; @@ -258,14 +258,14 @@ - (NSString *)packagerServerHost - (NSString *)packagerServerHostPort { -#if RCT_DEV | RCT_PACKAGER_LOADING_FUNCTIONALITY +#if RCT_DEV_MENU | RCT_PACKAGER_LOADING_FUNCTIONALITY if (!kRCTAllowPackagerAccess) { RCTLogInfo(@"Packager server access is disabled in this environment"); return nil; } #endif NSString *location = [self jsLocation]; -#if RCT_DEV +#if RCT_DEV_MENU NSString *scheme = [self packagerScheme]; if ([location length] && ![RCTBundleURLProvider isPackagerRunning:location scheme:scheme]) { location = nil;