Check internet connection on iphone doesn't work

断了今生、忘了曾经 提交于 2019-12-11 19:34:56

问题


I've tried many code to check internet connectivity from Apple docs and other sources.

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?


回答1:


Use reachability class . It checks the network connectivity



来源:https://stackoverflow.com/questions/6001082/check-internet-connection-on-iphone-doesnt-work

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