Skip to content

Commit

Permalink
Fix packager liveness check broken on internal builds
Browse files Browse the repository at this point in the history
Summary: Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D41437735

fbshipit-source-id: 83dbea41512c196bfcb4b8b9e5d94847f2b11ce4
  • Loading branch information
javache authored and OlimpiaZurek committed May 22, 2023
1 parent b733fb4 commit da4a94a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion React/Base/RCTBundleURLProvider.mm
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,18 @@ - (void)resetToDefaults
(unsigned long)kRCTBundleURLProviderDefaultPort]];
}

#if RCT_DEV_MENU
#if RCT_DEV_MENU | RCT_PACKAGER_LOADING_FUNCTIONALITY
+ (BOOL)isPackagerRunning:(NSString *)hostPort
{
return [RCTBundleURLProvider isPackagerRunning:hostPort scheme:nil];
}

+ (BOOL)isPackagerRunning:(NSString *)hostPort scheme:(NSString *)scheme
{
if (!kRCTAllowPackagerAccess) {
return NO;
}

NSURL *url = [serverRootWithHostPort(hostPort, scheme) URLByAppendingPathComponent:@"status"];

NSURLSession *session = [NSURLSession sharedSession];
Expand Down

0 comments on commit da4a94a

Please sign in to comment.