UIDevice *device = [UIDevice currentDevice];
SEL selector = NSSelectorFromString(@"deviceInfoForKey:");
if(![devicerespondsToSelector:selector]) {
selector =NSSelectorFromString(@"_deviceInfoForKey:");
}
if([devicerespondsToSelector:selector]) {
IMPimp = [devicemethodForSelector:selector];
NSString* (*func)(id,SEL,NSString*) = (void*)imp;
NSString*deviceColor = func(device,selector,@"DeviceColor");
NSString*deviceEnclosureColor = func(device,selector,@"DeviceEnclosureColor");
NSLog(@"%@ -- %@", deviceColor , deviceEnclosureColor);
}