How to determine whether user is on Edge or 3G on iPhone

前端 未结 4 1164

Though it is relatively straightforward to determine if an iPhone is on Wifi or a data network programmatically in your application, I can\'t figure out a way to determine i

4条回答
  •  不知归路
    2020-12-18 02:41

    The iPhone doesn't provide this kind of information to developers programmatically. The best you can hope for is to determine whether a connection to a given host will have to be routed over a cell network - see the SCNetworkReachability reference and the Reachability project for more.

提交回复
热议问题