react-native-device-info
Advanced tools
Comparing version 0.28.1 to 0.29.0
## Release Notes | ||
### 0.29.0 | ||
* Add `isAutoDateAndTime()` and `isAutoTimeZone()` (https://github.com/rebeccahughes/react-native-device-info/pull/583) | ||
### 0.28.1 | ||
@@ -4,0 +7,0 @@ * Add 'POCOPHONE F1' to list of notch devices (https://github.com/rebeccahughes/react-native-device-info/pull/584) |
@@ -49,4 +49,6 @@ // should be imported this way: | ||
getDeviceType: () => DeviceType; | ||
isAutoDateAndTime: () => Promise<boolean>; | ||
isAutoTimeZone: () => Promise<boolean>; | ||
}; | ||
export default _default; |
@@ -319,2 +319,8 @@ /** | ||
}, | ||
isAutoDateAndTime: function () { | ||
return RNDeviceInfo.isAutoDateAndTime(); | ||
}, | ||
isAutoTimeZone: function () { | ||
return RNDeviceInfo.isAutoTimeZone(); | ||
} | ||
}; |
{ | ||
"name": "react-native-device-info", | ||
"version": "0.28.1", | ||
"version": "0.29.0", | ||
"description": "Get device information using react-native", | ||
@@ -5,0 +5,0 @@ "main": "deviceinfo.js", |
@@ -254,2 +254,4 @@ # react-native-device-info | ||
| [getDeviceType()](#getDeviceType) | `string` | ✅ | ✅ | ❌ | ? | | ||
| [isAutoDateAndTime()](#isAutoDateAndTime) | `boolean` | ❌ | ✅ | ❌ | 0.29.0 | | ||
| [isAutoTimeZone()](#isAutoTimeZone) | `boolean` | ❌ | ✅ | ❌ | 0.29.0 | | ||
@@ -310,5 +312,7 @@ --- | ||
``` | ||
> to AppDelegate.m application:didFinishLaunchingWithOptions: | ||
> | ||
> Returns -1 on the iOS Simulator | ||
--- | ||
@@ -932,2 +936,26 @@ | ||
### isAutoDateAndTime() | ||
Tells if the automatic date & time setting is enabled on the phone. | ||
**Examples** | ||
```js | ||
DeviceInfo.isAutoDateAndTime().then(isAutoDateAndTime => { | ||
// true or false | ||
}); | ||
``` | ||
### isAutoTimeZone() | ||
Tells if the automatic time zone setting is enabled on the phone. | ||
**Examples** | ||
```js | ||
DeviceInfo.isAutoTimeZone().then(isAutoTimeZone => { | ||
// true or false | ||
}); | ||
``` | ||
## Troubleshooting | ||
@@ -934,0 +962,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
827
1024
131006
34