How can I detect if an iPhone OS device has a proximity sensor?
Posted
by Batgar
on Stack Overflow
See other posts from Stack Overflow
or by Batgar
Published on 2010-04-06T14:27:15Z
Indexed on
2010/04/06
14:33 UTC
Read the original article
Hit count: 254
iphone-sdk-3.0
|iphone
The docs related to proximity sensing state that if the proximity sensing APIs are used on a device without a proximity sensor (i.e. iPod touch, iPad) they will just return as if the proximity sensor has fired.
Aside from checking the [[UIDevice currentDevice].model] string and parsing for "iPhone", "iPod touch", or "iPad" is there a slicker way to determine if a proximity sensor is on a given device?
© Stack Overflow or respective owner