views:

147

answers:

1

Is it possible, without including an exhaustive list of models in the code, to determine if an iOS device includes a cellular radio?

I am working on adding a check for host reachability to an app, and I'd like the failure message to be appropriate for the device. For example:

A network connection is not available. Please join a Wi-Fi network or move to a location with better cellular reception.

This is fine for iPhone and iPad 3G, but it's amateur for an iPod touch or iPad without 3G. For those devices, I'd like to remove mention of cellular service.

I don't want to create an array in code of every iOS device that Apple has shipped that has a cellular radio.

+1  A: 

There doesn't seem to be a way. Erica Sadun has an interesting UIDevice-hardware extension project on github but it can't determine whether there is cellular radio either.

progrmr