Latest 0.0.3
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必须要添加对应描述

App需要您的同意,才能访问日历
NSCameraUsageDescription
App需要您的同意,才能访问相机
NSLocationAlwaysUsageDescription
App需要您的同意,才能始终访问位置
NSLocationAlwaysAndWhenInUseUsageDescription
App需要您的同意,才能在使用期间访问位置
NSLocationUsageDescription
App需要您的同意,才能访问位置
NSLocationWhenInUseUsageDescription
App需要您的同意,才能在使用期间访问位置
NSMicrophoneUsageDescription
App需要您的同意,才能访问麦克风
NSSpeechRecognitionUsageDescription
App需要您的同意,才能访问语音识别
NSContactsUsageDescription
App需要您的同意,才能访问通讯录
NSPhotoLibraryUsageDescription
App需要您的同意,才能访问相册
NSRemindersUsageDescription
App需要您的同意,才能访问提醒事项

Latest podspec

{
    "name": "KDPermission",
    "version": "0.0.3",
    "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.3"
    },
    "source_files": "KDPermission/*",
    "exclude_files": "Classes/Exclude",
    "resources": "KDPermission/KDPermission.bundle"
}

Pin It on Pinterest

Share This