Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-device-info

Package Overview
Dependencies
Maintainers
5
Versions
256
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-device-info - npm Package Compare versions

Comparing version 0.16.0 to 0.17.0

web/index.js

6

CHANGELOG.md

@@ -5,5 +5,9 @@ ## Release Notes

### 0.17.0
* Add an empty polyfill for `react-native-web` users (https://github.com/rebeccahughes/react-native-device-info/pull/339)
### 0.16.0
* Add the `googlePlayServicesVersion` Gradle build config that allows you to set the Play Services version from the root-project(https://github.com/rebeccahughes/react-native-device-info/pull/333)
* Add the `googlePlayServicesVersion` Gradle build config that allows you to set the Play Services version from the root-project (https://github.com/rebeccahughes/react-native-device-info/pull/333)

@@ -10,0 +14,0 @@ ### 0.15.3

13

deviceinfo.js
/**
* @providesModule react-native-device-info
*/
import { Platform, NativeModules } from 'react-native';
var RNDeviceInfo = require('react-native').NativeModules.RNDeviceInfo;
var RNDeviceInfo = NativeModules.RNDeviceInfo;
if (!RNDeviceInfo && Platform.OS === 'web') {
RNDeviceInfo = require('./web/RNDeviceInfoWeb');
}
module.exports = {

@@ -107,8 +112,8 @@ getUniqueID: function() {

},
getTotalDiskCapacity: function () {
getTotalDiskCapacity: function() {
return RNDeviceInfo.totalDiskCapacity;
},
getFreeDiskStorage: function () {
getFreeDiskStorage: function() {
return RNDeviceInfo.freeDiskStorage;
}
},
};
{
"name": "react-native-device-info",
"version": "0.16.0",
"version": "0.17.0",
"description": "Get device information using react-native",

@@ -5,0 +5,0 @@ "main": "deviceinfo.js",

@@ -15,2 +15,3 @@ # react-native-device-info

* [Release Notes](#release-notes)
* [react-native-web](#react-native-web)

@@ -437,3 +438,3 @@ ## Installation

> From [developer.android.com](https://developer.android.com/reference/android/os/Environment.html#getExternalStorageDirectory()):
> From [developer.android.com](<https://developer.android.com/reference/android/os/Environment.html#getExternalStorageDirectory()>):
>

@@ -443,5 +444,5 @@ > Return the primary shared/external storage directory.

> Note: don't be confused by the word "external" here. This directory can better be thought as
> media/shared storage. It is a filesystem that can hold a relatively large amount of data and
> media/shared storage. It is a filesystem that can hold a relatively large amount of data and
> that is shared across all applications (does not enforce permissions). Traditionally this is
> an SD card, but it may also be implemented as built-in storage in a device that is distinct
> an SD card, but it may also be implemented as built-in storage in a device that is distinct
> from the protected internal storage and can be mounted as a filesystem on a computer.

@@ -810,11 +811,11 @@

`react-native-device-info` uses `com.google.android.gms:play-services-gcm` to provide [getInstance()][#getinstance].
This can lead to conflicts when building the Android application.
`react-native-device-info` uses `com.google.android.gms:play-services-gcm` to provide [getInstance()][#getinstance].
This can lead to conflicts when building the Android application.
If you're using a different version of `com.google.android.gms:play-services-gcm` in your app, you can define the
`googlePlayServicesVersion` gradle variable in your `build.gradle` file to tell `react-native-device-info` what version
it should require.
If you're using a different version of `com.google.android.gms:play-services-gcm` in your app, you can define the
`googlePlayServicesVersion` gradle variable in your `build.gradle` file to tell `react-native-device-info` what version
it should require.
If you're using a different library that conflicts with `com.google.android.gms:play-services-gcm`, you can simply
ignore this dependency in your gradle file:
If you're using a different library that conflicts with `com.google.android.gms:play-services-gcm`, you can simply
ignore this dependency in your gradle file:

@@ -826,2 +827,3 @@ ```

```
</details>

@@ -832,3 +834,4 @@

Seems to be a bug caused by `react-native link`. You can manually delete `libRNDeviceInfo-tvOS.a` in `Xcode -> [Your iOS build target] -> Build Phrases -> Link Binary with Libraries`.
Seems to be a bug caused by `react-native link`. You can manually delete `libRNDeviceInfo-tvOS.a` in `Xcode -> [Your iOS build target] -> Build Phrases -> Link Binary with Libraries`.
</details>

@@ -839,5 +842,5 @@

`react-native-device-info` contains native code, and needs to be mocked.
`react-native-device-info` contains native code, and needs to be mocked.
Here's how to do it with jest for example:
Here's how to do it with jest for example:

@@ -859,7 +862,13 @@ ```

```
</details>
## Release Notes
See the [CHANGELOG.md](https://github.com/rebeccahughes/react-native-device-info/blob/master/CHANGELOG.md).
## react-native-web
As a courtesy to developers, this library was made compatible in v0.17.0 with [react-native-web](https://github.com/necolas/react-native-web) by providing an empty polyfill in order to avoid breaking builds.
Only [getUserAgent()](#getuseragent) will return a correct value. All other API methods will return an "empty" value of its documented return type: `0` for numbers, `''` for strings, `false` for booleans.

Sorry, the diff of this file is not supported yet

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