Skip to content

Commit

Permalink
Added unknown devices, adjusted code accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
Erica Sadun committed Mar 5, 2009
1 parent aab9966 commit 8452703
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
7 changes: 5 additions & 2 deletions UIDevice-hardware.h
Expand Up @@ -6,10 +6,13 @@
#define IPOD_2G_NAMESTRING @"iPod touch 2G"

typedef enum {
UIDevice1GiPhone,
UIDeviceUnknown,
UIDevice1GiPhone,
UIDevice1GiPod,
UIDevice3GiPhone,
UIDevice2GiPod
UIDevice2GiPod,
UIDeviceUnknowniPhone,
UIDeviceUnknowniPod
} UIDevicePlatform;

enum {
Expand Down
8 changes: 7 additions & 1 deletion UIDevice-hardware.m
Expand Up @@ -6,6 +6,12 @@

@implementation UIDevice (Hardware)

/*
Thanks to Eridius
*/

/*
Platforms
iPhone1,1 -> iPhone 1G
Expand All @@ -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
Expand Down

0 comments on commit 8452703

Please sign in to comment.