iPad Pro device detection

Thanks to @Mc.Lover

A little update for both Portrait and Landscape orientations:

if (([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad && ([UIScreen mainScreen].bounds.size.height == 1366 || [UIScreen mainScreen].bounds.size.width == 1366))) {
//iPad Pro
}

Special thanks to @rmaddy

The proper way to detect screens sizes is :

NSLog(@"%f",[UIScreen mainScreen].bounds.size.height);

Now if your application runs in Portrait mode you can simply use this code to detect iPad Pro :

#define iPadPro ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad && [UIScreen mainScreen].bounds.size.height == 1366)

Don't forget the need to use a LaunchScreen or the app won't take advantage of the iPad Pro's larger screen


detect iPad pro 12.9 inch no matter device's orientation

#define iPadPro12 (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad && UIScreen.mainScreen.nativeBounds.size.height == 2732)