It would be great if you just tested for device type:

if ([device rangeOfString:@"iPad"].location != NSNotFound)
return true;

if ([device rangeOfString:@"iPhone"].location !=...