React Native: How to Determine if Device is iPhone or iPad

react-native

Solution

As of 9.02.2018 there is also

import { Platform } from 'react-native'
Platform.isPad // boolean

Mind that (as of now) it has no android counterpart.

- IOS https://github.com/facebook/react-native/blob/master/Libraries/Utilities/Platform.ios.js#L23

- Android https://github.com/facebook/react-native/blob/master/Libraries/Utilities/Platform.android.js (no isPad!)

Problem

I know with React Native that we have the ability to determine whether iOS or Android is being run using the `Platform` module, but how can we determine what device is being used on iOS?

Original source