I was just playing around with the iPhone X simulator in Xcode, and I realized one of my apps has a view bug. I have a button placed with code (at the bottom of the screen in the middle) that is overlapping the bar that you swipe up to get to the home screen. Is there a way to detect, through code, if the device is an iPhone X, and an iPhone X only, so I can write code to counteract the bug? Maybe by detecting the precise screen width and height, and if so, what are those numbers? Thanks in advance. Any help is appreciated.
I'll join the chorus recommending to not do this for screen layout purposes - but for the record, sniffing LABiometryType should allow device detection/bifurcation:
https://developer.apple.com/documentation/localauthentication/labiometrytype