You can get the color from the model number, for example:
MD381 - Black iPhone 4S
MC920 - White iPhone 4S
...
To get the model number, use uidevice-extension
Addendum : An alternative solution. Link your project with libLockdown.dylib.
extern id lockdown_connect(); extern id lockdown_copy_value(id, id, id); extern void lockdown_disconnect(); extern NSString *kLockdownDeviceColorKey; NSString* CopyDeviceColor() { id connection = lockdown_connect(); NSString *color = lockdown_copy_value(connection, nil, kLockdownDeviceColorKey); NSLog(@"color = %@", color); lockdown_disconnect(connection); return color; }
source share