Joris Kluivers

I like to build software.

Model Identifiers

Some statistics data I recently worked with included model identifiers for Apple devices. These identifiers are strings like iPad2,1 or MacBookPro10,2 and indicate what device variant and generation the software was used on.

The raw identifier is not something you usually display in a user interface directly, instead you show a more friendlier name. Unfortunately a way to translate iPad2,1 to iPad 2 (Wifi) is not readily available.

For that reason I created my own collection of iOS and Mac device model identifiers.

The collection is available as a plist file where each identifier is mapped to three values:

  • Device - the device name (eg. Mac Book Pro, iPhone 5)
  • Generation - the device generation (eg. Late 2008)
  • Variant - variant within a generation (eg. 15-inch, Retina)

For the most up to date version download the raw model-identifier.plist file from master.

Note: An older identifier may refer to multiple models from different years or with different characteristics. In this case the Generation or Variant key is not unique and is usually left out. Somewhere around 2010 this practise changed and each identifier is unique for a specific device generation and variant.

Obtain a model identifier

To include the model identifier in your own statistics or client user-agent you can find it using the command line:

$ sysctl -n hw.model

Or to get a device model identifier using code, on Mac OS X or iOS use: