5

Possible Duplicate:
Detecting Color of iPhone/iPod touch?

Is it at all possible to detect the color of an iPhone / iPod - either natively or in the mobile browser?

I'm working with a designer who would love to make a web app respond to the color of the device.

enter image description here

Community
  • 1
  • 1
Ollie Glass
  • 19,455
  • 21
  • 76
  • 107

2 Answers2

5

I don't think this is possible. The internal hardware (the "motherboard" keeping all the components together and the components themselves) is manufactured without any knowledge about the final casing. The same is true for the software (firmware and iOS), since all devices get an equal copy of exactly the same software, byte for byte identical, except for any serial numbers that might be embedded in the firmware. It might be the case that Apple uses different device serial number ranges for different casings, yet that is just a wild speculation.

It's like building a car: All components (engine, electronics, etc.) are equally manufactured, regardless with what color the final car will be coated. Actual the car is completely assembled, all hardware and all software, and ready to be used before it is color coated; and up to the last second the final decision how to color it may change.


UPDATE

I did some more investigations on this topic and I found out that the "wild speculation" is not as wild as I assumed it to be. It really seems to be the case that Apple uses different serial number ranges for different device colors. The serial number (as well as similar numbers, like the IMEI of iPhones) are the only parts of the device firmware that are different for each device manufactured.

Apple used the following serial number format in the past (not sure if this is still up-to-date, but it was still up-to-date for the iPhone 4):

AABCCDDDEEE

 AA = ID of the factory that manufactured the device.
  B = Year of production: 8=>2008, 9=>2009, 0=>2010, 1=>2011, etc.
 CC = Week number of the year.
DDD = Production index number, is reset every week, base-34 encoded.
EEE = Model ID.

The interesting value is the "Model ID". The same device generation has different Model IDs depending on their color and the amount of available storage.

I haven't found any complete list of all the possible values, though. And even if there was such a complete list, you still have the problem that you need to keep it up-to-date, since Apple is constantly releasing new models, so the list could be out-dated any couple of months (at least once or even twice a year). Here are some sample values for the last 3 digits of the serial number (EEE):

VR0: iPhone 2G Silver 4GB
WH8: iPhone 2G Silver 8GB
0KH: iPhone 2G Silver 16GB
Y7H: iPhone 3G Black 8GB
Y7K: iPhone 3G Black 16GB
3NP: iPhone 3GS Black 16GB
3NR: iPhone 3GS Black 32GB
3NQ: iPhone 3Gs White 16GB
3NS: iPhone 3Gs White 32GB
A4S: iPhone 4 Black 16GB
A4T: iPhone 4 Black 32GB

I haven't found any sample values for the current iPod generations so far.

Mecki
  • 125,244
  • 33
  • 244
  • 253
  • 3
    This is not true. iTunes and Xcode usually display the colour of the device correctly, so it's readable over USB at the very least. – grahamparks Jan 10 '13 at 17:39
  • 1
    @grahamparks Then it is most likely really the case, that Apple uses different serial number ranges. This is fine for them, since whenever these ranges change, they just release an update for iTunes with an updated range database. Creating a database of this kind for your own app would probably not be a good idea, as you would have a hard time keeping it up-to-date. – Mecki Jan 10 '13 at 18:09
0

There's no API exposed for this.

If this is something you'd like Apple to add, you should file an enhancement request at http://bugreporter.apple.com .

Jonathan Grynspan
  • 43,286
  • 8
  • 74
  • 104