I don't recommend doing this really, but you could just find out what device it is and then base loading your app on if the method isCorrectDevice
returns true:
- (BOOL) isCorrectDevice
{
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *machine = malloc(size);
sysctlbyname("hw.machine", machine, &size, NULL, 0);
NSString *platform = [NSString stringWithCString:machine];
free(machine);
if ([platform isEqualToString:@"iPhone3,1"] ||
[platform isEqualToString:@"iPhone3,2"] ||
[platform isEqualToString:@"iPod4,1"] ||
[platform isEqualToString:@"iPad1,1"] ||
[platform isEqualToString:@"iPad2,1"] ||
[platform isEqualToString:@"iPad2,2"] ||
[platform isEqualToString:@"iPad2,3"])
return true;
else
return false;
}
There are a few problems doing this. One is, as soon as Apple release a new device this will be out of date and will not include the newer devices; but also, this won't stop users of other devices from downloading it. I guess you could just load a screen that says "Only available on..."? Just an idea.