Lede-Inc / LDNetDiagnoService_IOS

IOS平台利用ping和traceroute的原理,对指定域名(通常为后台API的提供域名)进行网络诊断,并收集诊断日志。
MIT License
1.15k stars 268 forks source link

iOS11 上引入文件报错 #19

Open tuluigi opened 7 years ago

tuluigi commented 7 years ago

`#if TARGET_IPHONE_SIMULATOR

include <net/route.h>

else`

iOS 11上报错,需要improt方式 #import "Route.h"

graceydb commented 7 years ago

楼主大大快来帮帮忙

GBChain commented 6 years ago

check_compile_time改为__Check_Compile_Time,因为在iOS 11里check_compile_time已经弃用了

CrazyFanFan commented 6 years ago

升级XCode9,在 LDNetGetAddress.m(line 21) 处有头文件的引用问题,代码如下:

if TARGET_IPHONE_SIMULATOR

include <net/route.h>

else

include "Route.h"

endif /the very same from google-code/

解决方案如下

if TARGET_IPHONE_SIMULATOR

if __IPHONE_OS_VERSION_MAX_ALLOWED < 110000 //iOS11,用数字不用宏定义的原因是低版本XCode不支持110000的宏定义

include <net/route.h>

else

include "Route.h"

endif

else

include "Route.h"

endif /the very same from google-code/