react-native Socket Event 在控制台的输出

在XCode中运行react-native 的时候,避免不了的要查看日志信息 ,但是react-native中的Socket的日志简直是太多了,往往是刚看到自己想要看到的信息的时候,瞬间就被最新的日志给刷上去类似:

nw_socket_handle_socket_event [C5255.1:1] Socket SO_ERROR [61: Connection refused]
nw_socket_handle_socket_event [C5255.2:1] Socket SO_ERROR [61: Connection refused]
nw_connection_get_connected_socket [C5255] Client called nw_connection_get_connected_socket on unconnected nw_connection

看着像是Error   但是对自己程序的运行没有影响,解决掉这个打印:

 

点击 product  ->   Scheme   ->    Edit  Scheme   ->  Run   ->  Arguments    ->  Environment Variable 

 

添加   Name :  OS_ACTIVITY_MODE    ;    Value :  disable 

 

posted @ 2018-10-16 18:08  Peng_Peng  阅读(3838)  评论(0编辑  收藏  举报