Proper method to detect device model (iPhone/iPod Touch)?

Posted by Mark on Stack Overflow See other posts from Stack Overflow or by Mark
Published on 2010-03-15T13:46:03Z Indexed on 2010/03/15 13:49 UTC
Read the original article Hit count: 202

Filed under:
|
|
|
|

Is this the proper way to detect which device a user is running?

NSString *currentModel = [[UIDevice currentDevice] model];
if ([currentModel isEqualToString:@"iPhone"]) {
    // The user is running on iPhone so allow Call, Camera, etc.
} else {
    // The user is running on a different device (iPod / iPad / iPhone Simulator) disallow Call.
}

© Stack Overflow or respective owner

Related posts about iphone

Related posts about ipod-touch