一 问题描述
- nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available, dumping backtrace:
- [x86_64] libnetcore-856.1.8
- 0 libsystem_network.dylib 0x000000010b23380e __nw_create_backtrace_string + 123
- 1 libnetwork.dylib 0x000000010c032194 nw_socket_add_input_handler + 3002
- 2 libnetwork.dylib 0x000000010c00fdb8 nw_endpoint_flow_attach_protocols + 3768
- 3 libnetwork.dylib 0x000000010c00edd5 nw_endpoint_flow_setup_socket + 563
- 4 libnetwork.dylib 0x000000010c00db34 -[NWConcrete_nw_endpoint_flow startWithHandler:] + 2612
- 5 libnetwork.dylib 0x000000010c028d11 nw_endpoint_handler_path_change + 1261
- 6 libnetwork.dylib 0x000000010c028740 nw_endpoint_handler_start + 570
- 7 libnetwork.dylib 0x000000010c040003 nw_endpoint_resolver_start_next_child + 2240
- 8 libdispatch.dylib 0x000000
二 问题解决
1. 到 Edit Scheme (快捷键 command + shift + <)
2.选择 Arguments 选项
3.添加变量 OS_ACTIVITY_MODE
= disable