使用Reachability.h
- Apple的代码处理iOS上的连接时:
+ (Reachability*) reachabilityWithAddress: (const struct sockaddr_in*) hostAddress;
我收到以下警告:
Declaration of 'struct sockaddr_in' will not be visible outside of this function
答案 0 :(得分:21)
在Reachability.h文件中添加#import <netinet/in.h>
,此警告将消失..:D