Device Information Through JSI for React Native.
yarn
yarn add react-native-jsi-device-info
or
npm
npm install react-native-jsi-device-info
And
cd ios && pod install
expo install react-native-jsi-device-info
expo prebuild
import JSIDeviceInfo from "react-native-jsi-device-info";
JSIDeviceInfo.getDeviceName() // returns Device Name
// Example
// iOS: "Khant Si Thu's iPhone 7"
// Android: ?
// Windows: ?
Run the example app for more.
Note that many APIs are platform-specific. If there is no implementation for a platform, then the "default" return values you will receive are "unknown"
for string, -1
for number, and false
for boolean. Arrays and Objects will be empty ([]
and {}
respectively).
The example app in this repository shows an example usage of every single API, consult the example app if you have questions, and if you think you see a problem make sure you can reproduce it using the example app before reporting it, thank you.
The initial work done by authors of the following libraries has helped a lot in keeping this repo updated.
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT