This package has been deprecated

Author message:

This Plugin is no-longer under development, please use nativescript-advanced-permissions instead.

@spartadigital/nativescript-permissions
TypeScript icon, indicating that this package has built-in type declarations

1.3.2 • Public • Published

@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

Package Sidebar

Install

npm i @spartadigital/nativescript-permissions

Weekly Downloads

1

Version

1.3.2

License

Apache-2.0

Last publish

Collaborators

  • adam-
  • ashrafaa
  • b.ingham
  • ulisses85