Table of iPhone Models and Hardware Machines (for example iPhone 5,1)

When attempting to identify iPhone devices, we typically refer to the Model, for example iPhone 5. However, there is also a Model Number, for example A1428 is the iPhone 5 for GSM networks. There is also a hardware machine that you can retrieve through code, for example iPhone5,1. Depending on what you are in need of, any of the identifiers can be helpful.

The table below lists iPhone devices from newest to oldest:

Name Introduced Model Number Hardware Machine
iPhone 5 (GSM) 2012 A1428 iPhone5,1
iPhone 5 (CDMA) 2012 A1429 iPhone5,2
iPhone 4S 2011 A1387 iPhone4,1
iPhone 4 (GSM) 2010 A1332 iPhone3,1
iPhone 4 (GSM Rev A) 2010 A1332 iPhone3,2
iPhone 4 (CDMA) 2011 A1349 iPhone3,3
iPhone 3GS 2009 A1303 iPhone2,1
iPhone 3G 2008 A1241 iPhone1,2
iPhone 2007 A1203 iPhone1,1
iPhone Simulator N/A N/A i386

The Model Number is on the back of the iPhone. To get the Hardware Machine in your application, you can write a method as shown below. I’ve written a more comprehensive post on getting the hardware info here Determine iPhone/iPod Hardware.

#include <sys/types.h>
#include <sys/sysctl.h>
 
- (NSString *)machine
{
  size_t size;
 
  // Set 'oldp' parameter to NULL to get the size of the data
  // returned so we can allocate appropriate amount of space
  sysctlbyname("hw.machine", NULL, &size, NULL, 0); 
 
  // Allocate the space to store name
  char *name = malloc(size);
 
  // Get the platform name
  sysctlbyname("hw.machine", name, &size, NULL, 0);
 
  // Place name into a string
  NSString *machine = [NSString stringWithCString:name];
 
  // Done with this
  free(name);
 
  return machine;
}

For a summary of all the details of the iPhone, check out this Wiki Page.

I hope to publish a similar list for the iPad and iPad Mini.

  1. Hi, I find the Model Number of my phone (iPhone 4S, WCDMA) is A1431. It seems that the Model Number is country-specific.

Comments are closed.