Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>3G by itself seems tough to find. You can find out whether a device can <em>make calls</em> using <a href="http://blog.ddg.com/?p=24" rel="nofollow noreferrer"><code>[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tel://"]]</code></a>. You can check whether a device can get to the internet, period (and by which method that can <strong>currently</strong> happen) using <a href="http://blog.ddg.com/?p=24" rel="nofollow noreferrer">Reachability</a> code:</p> <pre><code>NetworkStatus currentStatus = [[Reachability reachabilityForInternetConnection] currentReachabilityStatus]; if(currentStatus == kReachableViaWWAN) // 3G else if(currentStatus == kReachableViaWifi) // ...wifi else if(currentStatus == kNotReachable) // no connection currently possible </code></pre> <p>..but aside from that, I don't think you can check for the existence of a 3G modem in the device.***** If it can't make a call, and doesn't currently have cell data turned on and wifi turned <em>off</em>, you won't be able to find out if it's 3G-capable.</p> <p>An alternative way (not forward-compatible though, so you probably don't want to do this) is to compare the device's model with an exhaustive list, knowing which ones have 3G modems in them, as shown <a href="https://stackoverflow.com/a/3950748/244343">here</a>.</p> <p>***** As per bentech's answer, if you want to go digging around with device names (this may stop working with no advance warning if Apple decide to change the 3g interface name), call <code>getifaddrs</code> and check for the <code>pdp_ip0</code> interface.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload