Latest 1.0.0
Homepage https://github.com/AppleDP/WQPermissionRequest
License MIT
Platforms ios 8.0, requires ARC
Authors

权限判定及手动请求权限

Usage

支持权限类型

typedef enum {
    WQPhotoLibrary,        // 相册
    WQCamera,              // 相机
    WQMicrophone,          // 麦克风
    WQLocationAllows,      // 始终定位
    WQLocationWhenInUse,   // 使用时定位
    WQCalendars,           // 日历
    WQReminders,           // 提醒事项
    WQHealth,              // 健康更新
    WQUserNotification,    // 通知
    WQContacts,            // 通讯录
}WQPermission;

权限请求

[self.permissionRequest requestPermission:WQPhotoLibrary
                                        title:@"请求开启相册权限"
                                  description:@"开启相册权限"
                                requestResult:^(BOOL granted,
                                                NSError *error) {
                                    if (error) {
//                                        WQLogErr(@"error: %@",error);
                                    }else {
                                        if (granted) {
//                                            WQLogMes(@"请求成功");
                                        }else {
//                                            WQLogMes(@"请求失败");
                                        }
                                    }
                                }];

权限判定

[self.permissionRequest determinePermission:WQPhotoLibrary];

Pod install

pod 'WQPermissionRequest', '~> 1.0.0'

Latest podspec

{
    "name": "WQPermissionRequest",
    "version": "1.0.0",
    "summary": "A permission request framework",
    "description": "If you are the first request a permissionuff0cthe framework will call the system function to request for you.nAnd,if you are not the first request,it will be give you note to open the permission",
    "homepage": "https://github.com/AppleDP/WQPermissionRequest",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "AppleDP": "[email protected]"
    },
    "requires_arc": true,
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/AppleDP/WQPermissionRequest.git",
        "tag": "1.0.0"
    },
    "source_files": "WQPermissionRequest/**/WQPermissionRequest/*"
}

Pin It on Pinterest

Share This