我正在使用Facebook Audience Network SDK,
这是我的代码:

-(void)loadInterstitialAd
{
    FBInterstitialAd *interstitialAd =
    [[FBInterstitialAd alloc] initWithPlacementID:@"1783280735273073_1783280748606405"];
    interstitialAd.delegate = self;
    [interstitialAd loadAd];
}

但有个问题:
2016-10-10 15:44:47.296707 facebookADTest[35670:2286565] [] 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             0x00000001064af80e __nw_create_backtrace_string + 123
1   libnetwork.dylib                    0x000000010693f194 nw_socket_add_input_handler + 3002
2   libnetwork.dylib                    0x000000010691cdb8 nw_endpoint_flow_attach_protocols + 3768
3   libnetwork.dylib                    0x000000010691bdd5 nw_endpoint_flow_setup_socket + 563
4   libnetwork.dylib                    0x000000010691ab34 -[NWConcrete_nw_endpoint_flow startWithHandler:] + 2612
5   libnetwork.dylib                    0x0000000106935d11 nw_endpoint_handler_path_change + 1261
6   libnetwork.dylib                    0x0000000106935740 nw_endpoint_handler_start + 570
7   libnetwork.dylib                    0x000000010694d003 nw_endpoint_resolver_start_next_child + 2240
8   libdispatch.dylib                   0x000000

我不知道在什么情况下会出现此问题,并且我找不到有关它的任何信息,有什么主意吗?

最佳答案

我确保您正在使用simulator测试,SO_NOAPNFALLBK套接字是Apple添加在iOS10中,它在实际设备中使用。

您可以在Scheme中将其关闭:
Edit Scheme-> Arguments-> Environment Variables->添加OS_ACTIVITY_MODE:disable
希望这可以解决您的问题。

关于ios - facebook_ads_api显示“nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK失败:[42]协议(protocol)不可用,转回回溯”,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39953758/

10-11 04:28