React Native / How to determine iPhone X and XR and

Maksym Tymchyk
Startupr

--

At Startupr, we transformideas into success stories.

We in Plark Wallet want to use the most of all available space to provide you with the best user experience.

Sometimes you need to use specific rules for some styles in your your React Native application, like a header size. Each Apple iPhone’s model is different and some of them has a complicated screen at the top. The best way to determine iPhone X (with an eyebrow at top) is to check height of screen is 812px or 896px.

For iPhone X and XS have 812px height. For but iPhone XS Max and XR have 896px height.

--

--