Files

Return to Package Diff Home.
Brought to you by Intrinsic.

Package Diff: react-native-device-info @ 2.0.2 .. 2.0.3

CHANGELOG.md

@@ -2,6 +2,12 @@
### Next
+### 2.0.3
+* fix: adding conditions for tvOS location providers (https://github.com/react-native-community/react-native-device-info/pull/678)
+* docs: refresh example app and fix it so it works with tvOS
+* docs: alter API Chart in README.md - isAutoDateAndTime and isAutoTimeZone return Promise (https://github.com/react-native-community/react-native-device-info/pull/677)
+
+
### 2.0.2
* fix: checking for tvOS before attempting to get `isBatteryMonitoringEnabled` flag as tvOS doesn't support it (https://github.com/react-native-community/react-native-device-info/pull/673)
* types: make the typescript location / power returns specific (https://github.com/react-native-community/react-native-device-info/pull/669)

example/package.json

@@ -12,8 +12,8 @@
"react-native-device-info": "github:react-native-community/react-native-device-info"
},
"devDependencies": {
- "@babel/core": "^7.4.4",
- "@babel/runtime": "^7.4.4",
+ "@babel/core": "^7.4.5",
+ "@babel/runtime": "^7.4.5",
"babel-jest": "^24.8.0",
"jest": "^24.8.0",
"metro-react-native-babel-preset": "^0.54.1",

ios/RNDeviceInfo/RNDeviceInfo.m

@@ -400,12 +400,18 @@
RCT_EXPORT_METHOD(getAvailableLocationProviders:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
{
+#if !TARGET_OS_TV
resolve(@{
@"locationServicesEnabled": [NSNumber numberWithBool: [CLLocationManager locationServicesEnabled]],
@"significantLocationChangeMonitoringAvailable": [NSNumber numberWithBool: [CLLocationManager significantLocationChangeMonitoringAvailable]],
@"headingAvailable": [NSNumber numberWithBool: [CLLocationManager headingAvailable]],
@"isRangingAvailable": [NSNumber numberWithBool: [CLLocationManager isRangingAvailable]]
});
+#else
+ resolve(@{
+ @"locationServicesEnabled": [NSNumber numberWithBool: [CLLocationManager locationServicesEnabled]]
+ });
+#endif
}
- (void)dealloc

package.json

@@ -1,6 +1,6 @@
{
"name": "react-native-device-info",
- "version": "2.0.2",
+ "version": "2.0.3",
"description": "Get device information using react-native",
"main": "deviceinfo.js",
"typings": "./deviceinfo.d.ts",
@@ -60,7 +60,7 @@
"np": "^5.0.2",
"prettier": "^1.17.1",
"react": "^16.8.3",
- "typescript": "^3.4.5"
+ "typescript": "^3.5.1"
},
"eslintConfig": {
"extends": "@react-native-community"

README.md

@@ -261,8 +261,8 @@
| [hasNotch()](#hasNotch) | `boolean` | ✅ | ✅ | ✅ | 0.23.0 |
| [isLandscape()](#isLandscape) | `boolean` | ✅ | ✅ | ✅ | 0.24.0 |
| [getDeviceType()](#getDeviceType) | `string` | ✅ | ✅ | ❌ | ? |
-| [isAutoDateAndTime()](#isAutoDateAndTime) | `boolean` | ❌ | ✅ | ❌ | 0.29.0 |
-| [isAutoTimeZone()](#isAutoTimeZone) | `boolean` | ❌ | ✅ | ❌ | 0.29.0 |
+| [isAutoDateAndTime()](#isAutoDateAndTime) | `Promise<boolean>` | ❌ | ✅ | ❌ | 0.29.0 |
+| [isAutoTimeZone()](#isAutoTimeZone) | `Promise<boolean>` | ❌ | ✅ | ❌ | 0.29.0 |
| [supportedABIs()](#supportedABIs) | `string[]` | ✅ | ✅ | ❌ | 1.1.0 |
| [hasSystemFeature()](#hassystemfeaturefeature) | `Promise<boolean>` | ❌ | ✅ | ❌ | ? |
| [getSystemAvailableFeatures()](#getSystemAvailableFeatures) | `Promise<string[]>` | ❌ | ✅ | ❌ | ? |