Network reachability on iPhone

泪湿孤枕 提交于 2019-12-20 04:31:41

问题


Maybe is there a good way to determine if I have an internet connection or not? (3G or wifi) Thanks!


回答1:


Here's something a new search engine called Google revealed:

iPhone SDK: Testing Network Reachability




回答2:


See SCNetworkReachabilityRef datatype in the SystemConfigration framework. It does not test the network per se, it's a framework around ping.



来源:https://stackoverflow.com/questions/2401987/network-reachability-on-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!