I am trying to detect an iPhoneX in objective C and have found several posts/guides/websites, such as https://hype.codes/how-detect-iphone-x-programmatically that show how to do it and the values to compare it against. This usually means checking the [[UIScreen mainScreen] nativeBounds].size.height for 2436 or [[UIScreen mainScreen] bounds].size.height for 812
But here's the weird part: When I use either height sizes, I get different results than the expected values.
For the nativebounds, I get 2001, not 2436 when using the bounds, I get 667, not 812, which is the same as any iphone6/7/8 detection
In both cases I conclude to be missing the 145px (and nativebounds @3x=435) size difference, but why can't I get the correct size? like it shows in the iOS human interface guidelines ios human interface guidelines dimensions
I have tried this on both the simulator and an actual iphoneX, someone was so kind to let me experiment with, but keep running into this, I am completely stuck with this.
I am really hoping someone can help me on identifying and solving this issue, maaany thanks in advance.