Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/react-native/React/Base/RCTBundleURLProvider.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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;
Expand Down
Loading