objective-c - 错误 : Protocol not available, 转储回溯

标签 objective-c ios10 xcode8.2

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

我正在使用带有 ios 10xcode 8 版本。现在,我正在使用 API。如果,我在 Xcode 7 中使用 API,它可以正常工作,但是当我在 xcode 8 中使用的相同 API 出现错误消息时无法解析。

最佳答案

我找到了如下解决方案:

  1. 在 XCode 菜单中,转到产品 > 方案 > 编辑方案
  2. 打开参数标签
  3. 添加环境变量:- OS_ACTIVITY_MODEdisable

Xcode 8 Edit Scheme screen capture image

关于objective-c - 错误 : Protocol not available, 转储回溯,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39545603/

相关文章:

iphone - 如何使用“完成”键盘按钮关闭 UITextView?

ios - 批量更新后更新托管对象上下文中的托管对象

ios - 无法将类型 'NSFetchRequest<NSFetchRequestResult>' 的值转换为指定类型 'NSFetchRequest<T>'

ios - UINavigationBar 约束问题中的奇怪 UITextField 仅在 iOS 10 或更高版本上

objective-c - 管理 Controller 之间数据的最佳对象架构

ios - NSURLSession 错误处理

ios - CloudKit iOS 10 错误 : Account doesn't have access to CloudKit account

swift - IAP-Swift 3.0

swift - Xcode 8,将 UIButton 添加到非初始 View Controller 的导航栏

swift - IBOutlet 为零