Voices That Matter

Device

iPhone Developer Tips Stats:
Past 30 days - Pageviews: 88,766 Visitors: 61,679
Thank you everyone! Let's shoot for 100,000 by May. Pass it on...



Get iPhone Device Name, Unique Device Identifier (UDID), OS and Model

The iPhone SDK includes a singleton of class type UIDevice that you can use to retrieve device specific information (this works equally as well with the simulator).
Available Properties in UIDevice

uniqueIdentifier – identifier guaranteed to be unique for every device
name – arbitrary name found in General > About setting on device
systemName – name of the OS [...]

Device

Determine Device Type – 3G or 3GS / iPod First or Second Generation

Using the UIDevice class, you can figure out if your application is running on a iPod or an iPhone. To get this information, access the property named model which will return an NSString of iPhone or iPod touch. However, there may be times when you need more specifics, for example is the iPhone the latest [...]

Device

Is Application Running on iPhone or iPod touch

If you ever need to know whether your application is running on an iPod touch or an iPhone, the answer is as close as this one line of code:

NSString *deviceType = [UIDevice currentDevice].model;

To get the model of the device as a localized string:

Device