There's a pretty mature library (by me) for that called SDVersion.
You can check for running device's model, screen size and many other parameters. It also supports OSX.
Example:
// Check for device model
if ([SDVersion deviceVersion] == iPhone6)
NSLog(@"You got the iPhone 6. Sweet