diff --git a/UIDevice-hardware.h b/UIDevice-hardware.h index 7bd8b80..d5f4f93 100644 --- a/UIDevice-hardware.h +++ b/UIDevice-hardware.h @@ -6,10 +6,13 @@ #define IPOD_2G_NAMESTRING @"iPod touch 2G" typedef enum { - UIDevice1GiPhone, + UIDeviceUnknown, + UIDevice1GiPhone, UIDevice1GiPod, UIDevice3GiPhone, - UIDevice2GiPod + UIDevice2GiPod, + UIDeviceUnknowniPhone, + UIDeviceUnknowniPod } UIDevicePlatform; enum { diff --git a/UIDevice-hardware.m b/UIDevice-hardware.m index 41dc6b2..06bc7a5 100644 --- a/UIDevice-hardware.m +++ b/UIDevice-hardware.m @@ -6,6 +6,12 @@ @implementation UIDevice (Hardware) +/* + + Thanks to Eridius + + */ + /* Platforms iPhone1,1 -> iPhone 1G @@ -32,7 +38,7 @@ - (int) platformType if ([platform isEqualToString:@"iPhone1,2"]) return UIDevice3GiPhone; if ([platform isEqualToString:@"iPod1,1"]) return UIDevice1GiPod; if ([platform isEqualToString:@"iPod2,1"]) return UIDevice2GiPod; - return 0; + return UIDeviceUnknown; } - (NSString *) platformString