open-index/open-npm huggingface dataset:
npm package: @spartadigital/nativescript-permissions
Description: Your awesome NativeScript plugin.
Author: Your Name
Latest version: 1.3.2
Deprecated: This Plugin is no-longer under development, please use nativescript-advanced-permissions instead.

# @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:

```javascript
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](https://github.com/EddyVerbruggen/nativescript-feedback) for example.
    
| Property | Default | Description |
| --- | --- | --- |
| hasCameraPermission() | false | returns whether or not the application has the permissions to use the camera |
| requestCameraPermission() | Promise<boolean> | 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