Latest 1.0.0
Homepage https://github.com/QuintGao/GKAuthorizationTool
License MIT
Platforms ios 8.0
Frameworks Foundation, AssetsLibrary, Photos, AVFoundation, AddressBook, AddressBookUI
Authors

1.使用方法,以获取系统相册权限为例

// 检测当前应用是否获取相册权限
    BOOL photoAuth = [GKAuthorizationTool checkAuthorizationWithType:GKAuthorizationTypePhoto];
    if (photoAuth) {
        // 已经授权
    }else{ // 未授权
        // 开始授权,获取授权状态
        GKAuthorizationStatus status = [GKAuthorizationTool getPhotoAuthorizationStatus];
        if (status == GKAuthorizationStatusNotDetermined) { // 未授权过
            [GKAuthorizationTool requestPhotoAuthorizationCallback:^(GKAuthorizationStatus status) {
                if (status == GKAuthorizationStatusAuthorized){
                    // 授权成功
                }else{
                    // 授权失败
                }
            }];
        }else{ // 已授权过,后又关闭权限,直接跳转到系统设置中该应用的授权界面
            [self openSettingURL];// 打开系统设置该应用授权界面
        }
    }

2.支持CocoaPods

pod ‘GKAuthorizatonTool’

3.更新日志

1.0.0:支持相册、相机、麦克风授权,更新日期:2016.8.23

Latest podspec

{
    "name": "GKAuthorizationTool",
    "version": "1.0.0",
    "summary": "iOSu5bf9u7cfbu7edfu76f8u518cu3001u76f8u673au3001u9ea6u514bu98ceu6388u6743u7684u7b80u6613u5de5u5177",
    "description": "It is a tools userd on iOS, which implement by Objective-C!",
    "homepage": "https://github.com/QuintGao/GKAuthorizationTool",
    "license": "MIT",
    "authors": {
        "u9ad8u5764": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/QuintGao/GKAuthorizationTool.git",
        "tag": "1.0.0"
    },
    "source_files": "GKAuthorizationTool/*",
    "exclude_files": "Classes/Exclude",
    "frameworks": [
        "Foundation",
        "AssetsLibrary",
        "Photos",
        "AVFoundation",
        "AddressBook",
        "AddressBookUI"
    ]
}

Pin It on Pinterest

Share This