Attempt packager connection even when loaded from offline bundle
Reviewed By: bottledwalter Differential Revision: D3446086 fbshipit-source-id: b6400cf9b1ec0b59bb53f94b306698359072fb7a
This commit is contained in:
parent
662ec705cb
commit
d26ce2e2c0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue