1.3.2 • Published 6 years ago
@spartadigital/nativescript-permissions v1.3.2
@spartadigital/nativescript-permissions
This Plugin is a wrap around Nathanael's nativescript-permissions plugin, while providing IOS Permissions with a matching API.
Installation
Describe your plugin installation steps. Ideally it would be something like:
tns plugin add @spartadigital/nativescript-permissions
Usage
Right now to request the Camera Permissions, we use it like this
```javascript
import { Permissions } from '@spartadigital/nativescript-plugins';
if( ! Permissions.hasCameraPermission() ) {
Permissions.requestCameraPermission().then((hasPermission) => {
if( hasPermission ) {
// do something cool
} else {
// don't do something
}
});
}
```)
API
Describe your plugin methods and properties here. See nativescript-feedback for example.
Property | Default | Description |
---|---|---|
hasCameraPermission() | false | returns whether or not the application has the permissions to use the camera |
requestCameraPermission() | Promise | requests the user to allow Camera Permissions, returns a truthy promise if they do, and returns falsy if they don't |
License
Apache License Version 2.0, January 2004
1.3.2
6 years ago
1.3.1
7 years ago
1.3.0
7 years ago
1.3.0-RC1
7 years ago
1.3.0-BETA
7 years ago
1.2.0-BETA
7 years ago
1.1.0-BETA
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago