2016-09-17 15:16:04.386085 appDemo[2371:94976] [] __nwlog_err_simulate_crash simulate crash already simulated **"nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available"**
2016-09-17 15:16:04.386676 appDemo[2371:94976] [] 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             0x0000000112dc780e __nw_create_backtrace_string + 123
    1   libnetwork.dylib                    0x0000000113bfa194 nw_socket_add_input_handler + 3002
    2   libnetwork.dylib                    0x0000000113bd7db8 nw_endpoint_flow_attach_protocols + 3768
    3   libnetwork.dylib                    0x0000000113bd6dd5 nw_endpoint_flow_setup_socket + 563
    4   libnetwork.dylib                    0x0000000113bd5b34 -[NWConcrete_nw_endpoint_flow startWithHandler:] + 2612
    5   libnetwork.dylib                    0x0000000113bf0d11 nw_endpoint_handler_path_change + 1261
    6   libnetwork.dylib                    0x0000000113bf0740 nw_endpoint_handler_start + 570
    7   libdispatch.dylib                   0x0000000112b44980 _dispatch_call_block_and_release + 12
    8   libdispatch.dylib                   0x0000000112b6e
2016-09-17 15:16:04.387153 appDemo[2371:94976] [] nw_endpoint_flow_attach_protocols [2 192.168.0.100:80 in_progress socket-flow (satisfied)] Attached flow protocol
2016-09-17 15:16:04.387679 appDemo[2371:94976] [] nw_connection_endpoint_report [2 192.168.0.100:80 in_progress socket-flow (satisfied)] reported event flow:start_connect

我用的是xcode 8版和ios 10版.现在,我正在开发一个API.如果,我在Xcode 7中使用API,它可以正常工作,但当我在xcode 8中使用的相同API出现错误消息时,它似乎无法解析.

推荐答案

我找到了如下解决方案:

  1. In XCode menu, Go to Product > Scheme > Edit Scheme
  2. 打开"参数"选项卡
  3. 添加环境变量:-OS_ACTIVITY_MODEdisable

Xcode 8 Edit Scheme screen capture image

Objective-c相关问答推荐

Objective-C - 将浮点数转换为字符串的其他方法

当 UITextField 成为第一响应者时如何使 UIScrollView 自动滚动

Objective-C:在字符串中查找数字

使用 NSArray 初始化对象数组

让 iPhone sleeping

改变 setContentOffset:animated: 的速度?

判断对象是 NSArray 还是 NSDictionary

应用程序内部的Gift App

如何在 iOS 上将图像旋转 90 度?

UIFont 的磅值到底是多少?

何时应该使用 initWithNibName 初始化视图控制器?

NSSet 到 NSArray 转换调用 objectAtIndex?

ios 11 UITabBar UITabBarItem 定位问题

在 Objective C 中,你能判断一个对象是否具有特定的属性或消息吗?

HTML 内容适合 UIWebview 而无需缩小

从 URL Objective C 获取图像

100% 不透明度 UILabel 超过 50% 不透明度背景(UIView?)

UICollectionView 自动调整高度

如何在没有死锁的情况下同步调度主队列?

找出窗口中的 UIBarButtonItem 框架?