New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-device-info

Package Overview
Dependencies
Maintainers
5
Versions
257
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-device-info - npm Package Versions

1
26

3.0.0-rc.5

Diff

Changelog

Source

3.0.0-rc.5

  • fix: various fixes similar to / prompted by #771 / #768 / #769
  • fix: getSystemName() returns value on ios+android #771 thanks @cmpayc!
  • fix: getUniqueId() only returned value 1st call #768 thanks @tamhv!
  • fix: getModel() not working on iOS #769 Thanks @rnnyrk!
mikehardy
published 3.0.0-rc.4 •

Changelog

Source

3.0.0-rc.4

  • feat: memoize static return values for performance
mikehardy
published 3.0.0-rc.3 •

Changelog

Source

3.0.0-rc.3

  • fix: TypeScript getPowerState() return type was Object instaed of PowerState interface
  • fix: TypeScript definition file was missing getPhoneNumberSync()
mikehardy
published 3.0.0-rc.2 •

Changelog

Source

3.0.0-rc.2

  • Added a sync version of each API call, in practice it is very difficult to consume async APIs during app bootstrap and device info is frequently fundamental to app startup behavior. This still preserves the change away from paying the entire cost of information retrieval at startup - now you will only pay for exactly what you need.
mikehardy
published 3.0.0-rc.1 •

Changelog

Source

3.0.0-rc.1

  • fix incorrect use of macos for API selection vs ios in rc.3, rendering ios builds mostly useless
  • verified last of the v2->v3 discrepancies, this is a release candidate now
mikehardy
published 3.0.0-beta.3 •

Changelog

Source

3.0.0-beta.3

  • fix some real android device v2->v3 discrepancies
  • BREAKING CHANGE: more capitalization changes for API calls to standardize (see below)
  • BREAKING CHANGE: more return value changes to standardize return values (see below)
  • feat: you no longer have to be careful with platform-specific APIs, all APIs will work, just returning standard "unknown" return values (see above breaking change, and example App.js usage)
mikehardy
published 3.0.0-beta.2 •

Changelog

Source

3.0.0-beta.2

  • fix all emulator/simulator v2->v3 discrepancies
mikehardy
published 3.0.0-beta.1 •

Changelog

Source

3.0.0-beta.1

Each BREAKING CHANGE contains the required information to migrate. The example App.js shows sample usage.

  • BREAKING CHANGE: Every API call returns a Promise now (and thus no more Android constructor with async boolean argument)
    • This was required to improve module load speed, handle dynamic values, and release the main queue for iOS
  • BREAKING CHANGE: Every API call with acronyms ('getIP', 'getABI' etc follows pure camel-case now, e.g. 'getIp', 'getAbi')
    • This naming style is a consensus standard. Previously APIs here were half one way half the other. Now they are consistent
    • isAirPlaneMode -> isAirplaneMode
    • getIPAddress -> getIpAddress
    • getMACAddress -> getMACAddress
    • getAPILevel -> getApiLevel
    • getBaseOS -> getBaseOs
    • getInstanceID -> getInstanceId
    • getUniqueID -> getUniqueId
    • supportedABIs -> supportedAbis
  • BREAKING CHANGE: all events prefixed with 'RNDeviceInfo_' (https://github.com/react-native-community/react-native-device-info/issues/620)
    • This is required as event names are a global namespace and collisions are inevitable otherwise
    • powerStateDidChange -> RNDeviceInfo_powerStateDidChange
    • batteryLevelDidChange -> RNDeviceInfo_batteryLevelDidChange
    • batteryLevelIsLow -> RNDeviceInfo_batteryLevelIsLow
  • BREAKING CHANGE: Android getBuildNumber returns string like iOS (https://github.com/react-native-community/react-native-device-info/pull/648)
  • BREAKING CHANGE: remove is24Hour, getTimezone, isAutoTimeZone and isAutoDateAndTime, getDeviceLocale, getDeviceCountry, getPreferredLocales
    • This was the result of a survey. It removes API duplication in the react-native-community modules
    • Related PR: https://github.com/react-native-community/react-native-localize/pull/65
    • Use yarn add https://github.com/mikehardy/react-native-localize.git#e062f0d2dc3171dc18fdb7b7139d347ad03933dc to maintain isAutoTimeZone + isAutoDateAndTime until merged
  • BREAKING CHANGE: iOS switch deprecated WebView for WebKit / getUserAgent returns Promise (https://github.com/react-native-community/react-native-device-info/pull/757)
    • The change from WebView to WebKit was required as the API is being removed from the iOS platform
  • BREAKING CHANGE: if an API is platform-specific, all non-implementing platforms will return standard values of -1, false, or 'unknown' depending on return type
    • This was how most APIs behaved before but it was not 100% - some returned null or empty string before
    • getPhoneNumber sometimes returned null, now it will be 'unknown' if not known
  • deprecated: IP-address-related methods deprecated - use @react-native-community/netinfo or react-native-network-info or react-native-carrier-info
  • feat: all APIs are now restricted in Javascirpt to the platforms they have full implementations on so the web polyfill is up to date
  • feat: 'getAndroidId' on Android returns android.provider.Settings.Secure.ANDROID_ID, read platform docs for usage
  • feat: getUsedMemory (https://github.com/rebeccahughes/react-native-device-info/pull/356)
  • feat: getDeviceName() without Bluetooth permission on Android (https://github.com/react-native-community/react-native-device-info/issues/735)
  • feat: TurboModule support (https://github.com/react-native-community/react-native-device-info/pull/745) for these purposes (https://github.com/react-native-community/react-native-localize/pull/65)
  • feat: allow for destructured ES6 imports (https://github.com/react-native-community/react-native-device-info/pull/727)
  • feat: update gradle, add react-native devDependency and build.gradle reference to enhance module developer experience
  • fix: remove unnecessary gradle depencies (https://github.com/react-native-community/react-native-device-info/pull/746)
  • chore: de-linted all Java code, all Markdown
mikehardy
published 2.3.2 •

Changelog

Source

2.3.2

  • fix: load module async by default with option to load sync (https://github.com/react-native-community/react-native-device-info/pull/741)
mikehardy
published 2.3.1 •

Changelog

Source

2.3.1

  • fix: add Huawei P30 devices to isNothc list (https://github.com/react-native-community/react-native-device-info/pull/734)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc