mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-03-26 23:24:06 +08:00
Command line flags to start RN apps in web executor mode.
Reviewed By: frantic Differential Revision: D2613142 fb-gh-sync-id: fadcea3d23825420c0412f2e4d8d51c70b0f08ed
This commit is contained in:
committed by
facebook-github-bot-6
parent
c4739746ba
commit
cce9ba864f
@@ -39,7 +39,10 @@ RCT_EXPORT_MODULE()
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
return [self initWithURL:[RCTConvert NSURL:@"http://localhost:8081/debugger-proxy"]];
|
||||
NSUserDefaults *standardDefaults = [NSUserDefaults standardUserDefaults];
|
||||
NSInteger port = [standardDefaults integerForKey:@"websocket-executor-port"] ?: 8081;
|
||||
NSString *URLString = [NSString stringWithFormat:@"http://localhost:%zd/debugger-proxy", port];
|
||||
return [self initWithURL:[RCTConvert NSURL:URLString]];
|
||||
}
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)URL
|
||||
|
||||
Reference in New Issue
Block a user