I've found this code, here:
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
str = [NSString stringWithString:@"Running as an iPad application"];
} else {
str = [NSString stringWithString:
@"Running as an iPhone/iPod touch application"];
}
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Platform"
message:str
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
[alert release];
How safe is this check? Does Apple actually recommend doing this? Or can it happen that it won't detect an iPad as iPad, or iPhone as iPhone?