title: iPhone device Generation
body: <p>I have the following code </p>
  
  <pre><code>@implementation UIDevice(machine)
  
  - (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, &amp;size, NULL, 0); 
  
    // Allocate the space to store name
    char *name = malloc(size);
  
    // Get the platform name
    sysctlbyname("hw.machine", name, &amp;size, NULL, 0);
  
    // Place name into a string
    NSString *machine = [NSString stringWithCString:name];
  
    // Done with this
    free(name);
  
    return machine;
  }
  
  @end
  
  /* ... */
  
  NSLog(@"device: %@", [[UIDevice currentDevice] machine]);
  </code></pre>
  
  <p>I am getting the output as:</p>
  
  <pre><code>Platforms:
  -----------
  iPhone1,1 
  iPhone1,2 
  iPod1,1   
  iPod2,1   
  </code></pre>
  
  <p>what does the two numbers appended after the iphone/ipod touch signify i,e (1,1 ) , (1,2) etc ?</p>
  
  <p>Thanks
  Biranchi</p>