Skip to main content
Version: 0.77

Platform

Example


Reference

Properties

constants

React TSX
static constants: PlatformConstants;

Returns an object which contains all available common and specific constants related to the platform.

Properties:

Name
TypeOptionalDescription
isTestingbooleanNo
reactNativeVersionobjectNoInformation about React Native version. Keys are major, minor, patch with optional prerelease and values are numbers.
Version
Android
numberNoOS version constant specific to Android.
Release
Android
stringNo
Serial
Android
stringNoHardware serial number of an Android device.
Fingerprint
Android
stringNoA string that uniquely identifies the build.
Model
Android
stringNoThe end-user-visible name for the Android device.
Brand
Android
stringNoThe consumer-visible brand with which the product/hardware will be associated.
Manufacturer
Android
stringNoThe manufacturer of the Android device.
ServerHost
Android
stringYes
uiMode
Android
stringNoPossible values are: 'car', 'desk', 'normal','tv', 'watch' and 'unknown'. Read more about Android ModeType.
forceTouchAvailable
iOS
booleanNoIndicate the availability of 3D Touch on a device.
interfaceIdiom
iOS
stringNoThe interface type for the device. Read more about UIUserInterfaceIdiom.
osVersion
iOS
stringNoOS version constant specific to iOS.
systemName
iOS
stringNoOS name constant specific to iOS.

isPad
iOS

React TSX
static isPad: boolean;

Returns a boolean which defines if device is an iPad.

Type
boolean

isTV

React TSX
static isTV: boolean;

Returns a boolean which defines if device is a TV.

Type
boolean

isVision

React TSX
static isVision: boolean;

Returns a boolean which defines if device is an Apple Vision. If you are using Apple Vision Pro (Designed for iPad) isVision will be false but isPad will be true

Type
boolean

isTesting

React TSX
static isTesting: boolean;

Returns a boolean which defines if application is running in Developer Mode with testing flag set.