To do just that, you need:
if(![[UIDevice currentDevice].model isEqualToString:@"iPad2"])
{
UIAlertView *alertView = [UIAlertView alloc] initWithTitle:@"Error"
message:@"Microphone not present"
delegate:self
cancelButtonTitle:@"Dismiss"
otherButtonTitles: nil];
[alertView show];
[alertView release];
}
Taken from here
But, as I said above, it would be better to check for a microphone than for an exact model. What if someone uses an iPad 1 with an external microphone?
EDIT: This is the correct method , apologies, Merlin.
Also considered fooobar.com/questions/230627 / ...
Dave
source
share