1.0.5 • Published 7 years ago

react-native-authorization v1.0.5

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

react-native-authorization BuildPlatformnpm

Request user permissions from React Native, iOS + Android

  • iOS: need add authorization’s key in info.plist
  • android: need add permission in AndroidManifest.xml

Content

Installation

# step 1
npm install react-native-authorization 
# yarn add react-native-authorization

# step 2
react-native link react-native-authorization 

Usage

import Helper from 'react-native-authorization'

Helper.check(Helper.CAMERA).then((r)=>{
    console.log(r);
});

API

Methods

Method NameArgumentsNotesiOSandroid
checktypeReturns a promise✔️✔️
multipleChecktype1,type2Returns a promise✔️

Check Type

NameiOSandroid
CAMERA✔️✔️
LIBRARY✔️
LOCATION✔️✔️
ALWAYSLOCATION✔️
USELOCATION✔️
MIKE✔️
CALENDAR✔️
CONTACTS✔️
MICROPHONE✔️
PHONE✔️
SENSORS✔️
SMS✔️
STORAGE✔️

Permission Result

ResultTypeiOSandroid
Authorizedstring✔️
AuthorizedAlwaysstring✔️
AuthorizedWhenInUsestring✔️
Deniedstring✔️
NotDeterminedstring✔️
Restrictedstring✔️
trueboolean✔️
falseboolean✔️

Author

Ruwei Li, liruwei0109@outlook.com

License

react-native-authorization is available under the ISC license. See the LICENSE file for more info.

1.0.5

7 years ago

1.0.4

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago