vn-verdnaturachat/app/utils/deviceInfo.js

19 lines
525 B
JavaScript
Raw Normal View History

2019-01-29 19:52:56 +00:00
import { Platform } from 'react-native';
import DeviceInfo from 'react-native-device-info';
const NOTCH_DEVICES = ['iPhone X', 'iPhone XS', 'iPhone XS Max', 'iPhone XR'];
2019-01-29 19:52:56 +00:00
export const isNotch = NOTCH_DEVICES.includes(DeviceInfo.getModel());
export const isIOS = Platform.OS === 'ios';
export const isAndroid = !isIOS;
export const getReadableVersion = DeviceInfo.getReadableVersion();
2019-02-07 15:48:10 +00:00
export const getBundleId = DeviceInfo.getBundleId();
2019-01-29 19:52:56 +00:00
export default {
2019-01-29 19:52:56 +00:00
isNotch,
isIOS,
isAndroid,
2019-02-07 15:48:10 +00:00
getReadableVersion,
getBundleId
};