Is there a way to determine the device running an application. I want to distinguish between iPhone
and iPod Touch
, if possible.
I'd like to add that to retrieve the front and enclosure color of the device there's a private API:
UIDevice *device = [UIDevice currentDevice];
SEL selector = NSSelectorFromString([device.systemVersion hasPrefix:@"7"] ? @"_deviceInfoForKey:" : @"deviceInfoForKey:");
if ([device respondsToSelector:selector]) {
NSLog(@"DeviceColor: %@ DeviceEnclosureColor: %@", [device performSelector:selector withObject:@"DeviceColor"], [device performSelector:selector withObject:@"DeviceEnclosureColor"]);
}
I've blogged about this and provide a sample app:
http://www.futuretap.com/blog/device-colors/