检查iphone上的互联网连接不工作 [英] Check internet connection on iphone doesn't work
本文介绍了检查iphone上的互联网连接不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试过许多代码来检查来自Apple文档和其他来源的互联网连接。
I've tried many code to check internet connectivity from Apple docs and other sources.
问题是如果地址是google.com return TRUE
,如果它的gydsddsds.com返回 FALSE
,但如果我从互联网断开我的电脑,再次返回真的
!
The problem is that if the address is google.com return TRUE
, if it's gydsddsds.com return FALSE
, but if I disconnect my PC from Internet it return again TRUE
!
你有一个真正有效的方法吗?
Have you got a really working method please?
推荐答案
使用可达性类。它检查网络连接
Use reachability class . It checks the network connectivity
这篇关于检查iphone上的互联网连接不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文