9

We can use uname to tell the difference between iphone 3GS v.s. iphone 4 v.s. ipod touch v.s. ipad...

But how can we tell the difference between white and black iphones?

I would like to customize the user experience based on that.

Thanks.

vgr
  • 543
  • 1
  • 5
  • 13

1 Answers1

14

The serial number on the iPhone gives you all this info, you just need to map the code for colour to the colour itself.

Typical format of the iPhone SN is as follows: AABCCDDDEEF

AA = Factory and Machine ID
B = Year of Manufacturing (9 is 2009/2019, 0 is 2010/2020, 1 is 2011 and so on)
CC = Production Week (01 is week 1 of B, 11 is week 11 of B and so on)
DDD = Unique Identifier
EE = Color (A4=black)
F = size (S=16GB, T=32GB)

More info: http://www.pressbyte.com/640/decode-iphone-hardware-information-serial-number/

Dimitar
  • 2,392
  • 2
  • 19
  • 28
  • Awesome! Apple would indeed think it important to encode the color of the device into the serial number! Too funny. – Paul Sasik Mar 29 '11 at 00:53
  • I thought it was funny at first too, but when you think about it, it makes sense to be able to differentiate between your phone models. – Dimitar Mar 29 '11 at 00:55
  • Thanks! :) How do you get the serial number? I found some ways using IOKit but is that something that is Apple approved for the app store? – vgr Apr 04 '11 at 19:54
  • As far as I'm aware there aren't any restrictions on using IOKit, but I may be wrong.. – Dimitar Apr 05 '11 at 00:26