Skip to content

Instantly share code, notes, and snippets.

@hotsen
Forked from mschwartz/RCTWebSocketExecutor.m
Created July 19, 2016 20:34
Show Gist options
  • Save hotsen/0dd016093f818cd48ae765dfc27fd5e1 to your computer and use it in GitHub Desktop.
Save hotsen/0dd016093f818cd48ae765dfc27fd5e1 to your computer and use it in GitHub Desktop.
Fix WebSocket URL to debug on target
- (instancetype)init
{
// return [self initWithURL:[RCTConvert NSURL:@"http://localhost:8081/debugger-proxy"]];
NSString *serverIP = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"SERVER_IP"];
NSString *debugUrlString = [NSString stringWithFormat:@"http://%@:8081/debugger-proxy", serverIP];
return [self initWithURL:[RCTConvert NSURL:debugUrlString]];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment