Socket
Book a DemoInstallSign in
Socket

cordova-gizwits-privacy-permission

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-gizwits-privacy-permission

a tool to request privacy authorization

latest
npmnpm
Version
2.0.3
Version published
Maintainers
1
Created
Source

Gizwits 隐私使用

插件提供查询隐私授权状态及请求授权的功能。

支持平台

  • iOS

插件安装移除

# 安装
cordova plugin add cordova-gizwits-privacy-permission
# 移除
cordova plugin rm cordova-gizwits-privacy-permission

接口使用说明

  • 获取隐私授权状态 getAuthorizationStatus

    // 隐私类型
    type = "location";
    cordova.plugins.gizPrivacyPermission.getAuthorizationStatus(type, func (status) {
    	// status 授权状态值。请参照状态值表。
    }, func (errorMessage) {
    	// errorMessage 错误信息
    });
    

    该接口支持的隐私类型如下:

    类型描述系统版本支持
    photo图库/照片
    camera相机
    media音乐/视频iOS 9.3 及以上
    microphone麦克风
    location定位
    push-notification推送
    speech语音识别/听写iOS 10.0 及以上
    event日历事件
    reminder提醒事项
    contact联系人iOS 9.0 及以上
  • 请求授权 requestAuthorization

    // 隐私类型
    type = "location-always";
    cordova.plugins.gizPrivacyPermission.requestAuthorization(type, func (status) {
    	// status 授权状态值。请参照状态值表。
    }, func (errorMessage) {
    	// errorMessage 错误信息
    });
    

    该接口支持的隐私类型如下:

    类型描述系统版本支持
    photo图库/照片
    camera相机
    media音乐/视频iOS 9.3 及以上
    microphone麦克风
    location-always总是允许使用位置信息
    location-when-in-useApp运行期间使用位置信息
    speech语音识别/听写iOS 10.0 及以上
    event日历事件
    reminder提醒事项
    contact联系人iOS 9.0 及以上

状态值表

授权状态值描述
0未授权 Authorization status not determined
1功能不可用 Authorization status restricted
2拒绝授权 Authorization status denied
3已授权 Authorization status authorized
4位置功能总是可用 Authorization status authorized location always
5位置功能在App运行时可用 Authorization status authorized location when in use
6未知状态 Authorization status unknown

Keywords

gizwits

FAQs

Package last updated on 17 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts