# react-native-cz-permission

> npm install react-native-cz-permission --save

Latest version **0.0.2** (published 2019-02-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-cz-permission
pnpm add react-native-cz-permission
yarn add react-native-cz-permission
bun add react-native-cz-permission
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2019-02-25 |
| First published | 2019-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 85.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | 陈哲是个好孩子 |
| Maintainers | chenzhe555 |
| Keywords | react-native, permission |

## Links

- npm: https://www.npmjs.com/package/react-native-cz-permission
- npm.io page: https://npm.io/package/react-native-cz-permission

## Recent versions

- 0.0.2 (latest) — 2019-02-25

## README

## Manual installation

npm install react-native-cz-permission --save

	

## Usage
###  1.引入组件
```
import Permission from "react-native-cz-permission";
```

iOS: 在Podfile中加入
```
pod 'RNCzPermission', :path => '../node_modules/react-native-cz-permission/ios/RNCzPermission.podspec'
```
然后执行
```
pod install
```

###  2.属性:
###  3.属性方法:
###  4.供外部调用的方法:
```
/*
* 检验是否开启通知
* callback(result) result: 1.是, 2否
* */
Permission.checkPushNotification((result) => {
        
});
```

```
/*
* 打开通知设置页面
* callback(result) result: 1.可打开 2.不可打开
* */
Permission.openPushNotification((result) => {
        
});
```

```
/*
* 检验是否开启网络
* callback(result) result: 1.是, 2否
* */
Permission.checkNetwork((result) => {
        
});
```

```
/*
* 打开网络设置页面
* callback(result) result: 1.是, 2否
* */
Permission.openNetwork((result) => {
        
});
```

```
/*
* 检验是否开启相机
* callback(result, type) result: 1.是, 2否; type: 1.未弹出授权页 2.该App不能使用相机 3.用户拒绝访问相机 4.用户允许访问相机
* */
Permission.checkCamera((result) => {
        
});
```

```
/*
* 打开相机设置页面
* callback(result) result: 1.是, 2否
* */
Permission.openCamera((result) => {
        
});
```

---
_Source: https://npm.io/package/react-native-cz-permission · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
