diff --git a/React/Base/RCTBundleURLProvider.mm b/React/Base/RCTBundleURLProvider.mm index 6781f034ebb087..146280bf717507 100644 --- a/React/Base/RCTBundleURLProvider.mm +++ b/React/Base/RCTBundleURLProvider.mm @@ -125,6 +125,12 @@ + (BOOL)isPackagerRunning:(NSString *)host - (NSString *)packagerServerHost { NSString *location = [self jsLocation]; + if (location) { + NSInteger index = [location rangeOfString:@":"].location; + if (index != NSNotFound) { + location = [location substringToIndex:index]; + } + } #if RCT_DEV_MENU if ([location length] && ![RCTBundleURLProvider isPackagerRunning:location]) { location = nil;