Latest 0.0.1
Homepage https://github.com/JazeNigh/KDPermission
License MIT
Platforms ios 8.0
Authors

iOS 申请判断系统权限

用法:
引入

import

调用

[[KDPermission helper] getCameraPemission:^(BOOL isAuth) {

   if (isAuth) 
    {
     NSLog(@"去调起相机");
    }
}];

block回调注意线程转换
info.plist必须要添加对应描述

<key>NSCameraUsageDescription</key>
<string>若不允许,您将无法拍摄照片和视频,也无法使用视频通话和扫码功能</string>
<key>NSMicrophoneUsageDescription</key>
<string>若不允许,您将无法发送语音消息或进行音视频通话</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>若不允许,您将无法上传照片</string>
<key>NSContactsUsageDescription</key>
<string>若不允许,您将无法同步至通讯录</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>若不允许,您将无法分享位置信息</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>若不允许,您将无法分享位置信息</string>

Latest podspec

{
    "name": "KDPermission",
    "version": "0.0.1",
    "summary": "A sharedInstance helper get device auth",
    "homepage": "https://github.com/JazeNigh/KDPermission",
    "license": "MIT",
    "authors": {
        "mumu": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/JazeNigh/KDPermission.git",
        "tag": "0.0.1"
    },
    "source_files": "KDPermission/*",
    "exclude_files": "Classes/Exclude",
    "resources": "KDPermission/KDPermission.bundle"
}

Pin It on Pinterest

Share This