Socket
Book a DemoInstallSign in
Socket

react-native-device-specs

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-device-specs

Detect the specifications of a device on iOS or android in react-native.

Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
4
-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

React Native Device Specs

RNDeviceSpecs detects the specifications of the device it is running on. Requiring or importing the module will give you an object with properties that describe the user's device.

Add it to your project

  • npm install react-native-device-specs --save
  • Open your project in XCode, right click on Libraries, click Add files to (Your Project Name), and select RNDeviceSpecs.xcodeproj
  • Add libRNDeviceSpecs.a to Build Phases --> Link Binary With Libraries
  • Use import specs from 'react-native-device-specs' or var specs = require('react-native-device-specs') in your project!

Properties

  • platform: The platform code.
  • actualDiskSpace: The actual size of the disk.
  • storage: The best guess for the advertised size of the disk.
  • carrier: The carrier of device or 'No Carrier' for Simulators or Devices without a carrier.
  • formalName: The formal name of the device. e.g. 'iPhone 5S (GSM)', 'iPhone 5S (GSM+CDMA)'.
  • name: The standard name for the device. e.g. 'iPhone 5s'.
  • possibleColors: The colors that this device comes in.

Contributing

Feel free to submit a pull request with feature suggestions or device updates. Please maintain a consistent syntax for new devices (See lib/iosModels.js for examples)

Keywords

React

FAQs

Package last updated on 02 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts