Authored by 孙凯

add 添加开关控制 review by daiqiang

... ... @@ -12,6 +12,7 @@
#import <React/RCTConvert.h>
#import <React/RCTDefines.h>
#import <React/fishhook.h>
#import <React/RCTLog.h>
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 /* __IPHONE_11_0 */
#import <os/log.h>
... ... @@ -94,7 +95,9 @@ static void my_os_log_error_impl(void *dso, os_log_t log, os_log_type_t type, co
- (void)start
{
return;
if(!RCTLOG_ENABLED){
return;
}
[self stop];
_socket = [[RCTSRWebSocket alloc] initWithURL:_url];
_socket.delegate = self;
... ...
... ... @@ -530,7 +530,10 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
- (void)_connect;
{
return;
if(!RCTLOG_ENABLED){
return;
}
if (!_scheduledRunloops.count) {
[self scheduleInRunLoop:[NSRunLoop RCTSR_networkRunLoop] forMode:NSDefaultRunLoopMode];
}
... ...