Created
January 25, 2017 17:44
-
-
Save thefinnomenon/de4afd8da2052be15708345d72641c16 to your computer and use it in GitHub Desktop.
React Native iOS Remote Debugger using ngrok
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
- (void)setUp | |
{ | |
if (!_url) { | |
NSUserDefaults *standardDefaults = [NSUserDefaults standardUserDefaults]; | |
NSInteger port = [standardDefaults integerForKey:@"websocket-executor-port"]; | |
if (!port) { | |
port = [[[_bridge bundleURL] port] integerValue] ?: 8081; | |
} | |
NSString *host = [[_bridge bundleURL] host]; | |
if (!host) { | |
host = @"localhost"; | |
} | |
//NSString *URLString = [NSString stringWithFormat:@"http://%@:%zd/debugger-proxy?role=client", host, port]; | |
NSString *URLString = [NSString stringWithFormat:@"https://%s:%zd/debugger-proxy?role=client", "<YOUR SUBDOMAIN>.ngrok.io", 443]; | |
_url = [RCTConvert NSURL:URLString]; | |
} | |
... |
@thefinnomenon Yeah I know about http/s default ports, I think what me in 2017 meant was, why hardcoded, but this makes no sense either, so no idea what I wanted
@samermurad haha fair enough. I can't even remember writing this tbh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@sagark1510
Not really sure on the Android side but I would just grep for a similar debugger-proxy string and edit it the same as I did here.