tags:

views:

131

answers:

1

I'd like to find out and store information about a users device.

I'm looking for the date, the type (iPhone/iPod/iPad), the locale (Language) and location.

The date should be simple to get, as is the device type.

What code is used to find out the current locale/language of the device interface?

A: 

Check out the NSLocale class. You can grab an instance of the current locale using +currentLocale or +autoupdatingCurrentLocale; the class defines a number of constants that you can use to get language and country information from that instance using its -objectForKey: method, e.g. NSLocaleCountryCode and NSLocaleLanguageCode.

Noah Witherspoon