From d26ce2e2c0a38235d2fc394743b64893037afec0 Mon Sep 17 00:00:00 2001 From: Alex Kotliarskyi Date: Mon, 20 Jun 2016 10:50:01 -0700 Subject: [PATCH] Attempt packager connection even when loaded from offline bundle Reviewed By: bottledwalter Differential Revision: D3446086 fbshipit-source-id: b6400cf9b1ec0b59bb53f94b306698359072fb7a --- React/Modules/RCTDevMenu.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/React/Modules/RCTDevMenu.m b/React/Modules/RCTDevMenu.m index d7cbc5dc5..0b2fdaa9e 100644 --- a/React/Modules/RCTDevMenu.m +++ b/React/Modules/RCTDevMenu.m @@ -239,11 +239,12 @@ RCT_EXPORT_MODULE() - (NSURL *)packagerURL { NSString *host = [_bridge.bundleURL host]; + NSString *scheme = [_bridge.bundleURL scheme]; if (!host) { - return nil; + host = @"localhost"; + scheme = @"http"; } - NSString *scheme = [_bridge.bundleURL scheme]; NSNumber *port = [_bridge.bundleURL port]; if (!port) { port = @8081; // Packager default port