I'm writing an app that needs to function differently if it is running on different models of the iPhone/iPod Touch. How can I check if the app is running on 3GS, 3G or other?
Asked
Active
Viewed 899 times
2 Answers
2
The UIDevice
class provides some information like this.
But you're probably much better off testing for capabilities ("does this device support compass headings?") than for specific models ("is this device a 3GS?"). What is it that you're trying to do?
Edit: for the specific example I presented above, see the headingAvailable
property of CLLocationManager
. It will be YES
if and only if heading information can be obtained from the device.

Sixten Otto
- 14,816
- 3
- 48
- 60
-
You hit on what I'm trying to do actually. I want to support the compass when it is available and when it isn't, do something else entirely. – derekvanvliet Oct 14 '09 at 20:45