Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/martinmoec/Fable.ReactNative.DeviceInfo
Fable bindings for react-native-device-info
https://github.com/martinmoec/Fable.ReactNative.DeviceInfo
Last synced: about 2 months ago
JSON representation
Fable bindings for react-native-device-info
- Host: GitHub
- URL: https://github.com/martinmoec/Fable.ReactNative.DeviceInfo
- Owner: martinmoec
- Created: 2020-02-28T18:32:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-08-24T10:36:30.000Z (about 4 years ago)
- Last Synced: 2024-07-28T16:34:58.738Z (about 2 months ago)
- Language: F#
- Size: 259 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fable.ReactNative.DeviceInfo - Fable bindings for react-native-device-info
Provides Fable bindings for [react-native-device-info.](https://github.com/react-native-community/react-native-device-info) Some functions are only available for a specific OS, see the `react-native-device-info` documentation for further information. Promises and platform specific code is wrapped within promises returning a `Result<'a,string>`. You can also access all functions directly through `Globals.DeviceInfo` if you wish to do so.
## Setup
Install nuget package:
`paket add Fable.ReactNative.DeviceInfo`Install npm module:
`yarn add react-native-device-info`For ios:
`cd ios && pod install`Note that some functions, like `getBatteryLevel` will require specific permissions and/or configurations. See the [react-native-device-info](https://github.com/react-native-community/react-native-device-info) documentation for further information.
## Sample
See the `sample` folder. The `sample` folder contains only a single F# file, simulating a sample Fable.React.Native project, and is not runnable. For instructions on how to set up a F# React Native project see [this](https://github.com/martinmoec/fable-react-native-how-to) how-to.
![Sample](/sample/img/sample.png)