{"id":20200169,"url":"https://github.com/mxabc/lbxpermission","last_synced_at":"2025-10-16T21:26:47.661Z","repository":{"id":45129953,"uuid":"109371293","full_name":"MxABC/LBXPermission","owner":"MxABC","description":"iOS常用权限请求判断","archived":false,"fork":false,"pushed_at":"2021-04-26T21:19:15.000Z","size":666,"stargazers_count":461,"open_issues_count":13,"forks_count":46,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-29T18:09:02.254Z","etag":null,"topics":["authority","permission"],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MxABC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-03T08:30:01.000Z","updated_at":"2025-03-28T06:52:05.000Z","dependencies_parsed_at":"2022-08-26T10:20:07.956Z","dependency_job_id":null,"html_url":"https://github.com/MxABC/LBXPermission","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MxABC%2FLBXPermission","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MxABC%2FLBXPermission/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MxABC%2FLBXPermission/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MxABC%2FLBXPermission/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MxABC","download_url":"https://codeload.github.com/MxABC/LBXPermission/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247386266,"owners_count":20930619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authority","permission"],"created_at":"2024-11-14T04:42:17.604Z","updated_at":"2025-10-16T21:26:42.619Z","avatar_url":"https://github.com/MxABC.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"### LBXPermission\n***\niOS常用权限获取\n\n![1112.gif](https://upload-images.jianshu.io/upload_images/4952852-d03da06805c9bcf7.gif?imageMogr2/auto-orient/strip)\n\n调用接口简单，易用,如下面相机和定位权限判断及获取\n\n```\n//相机权限获取，已经有权限了，仍然可通过该接口返回状态\n    [LBXPermission authorizeWithType:LBXPermissionType_Camera completion:^(BOOL granted, BOOL firstTime) {\n     \n        if (granted) {\n            //TODO\n            //dosth\n        }\n        else if (!firstTime)\n        {\n            //不是第一次请求权限，那么可以弹出权限提示，用户选择设置，即跳转到设置界面，设置权限\n             [LBXPermissionSetting showAlertToDislayPrivacySettingWithTitle:@\"提示\" msg:@\"没有相机权限，是否前往设置\" cancel:@\"取消\" setting:@\"设置\"];\n        }\n    }];\n    \n    \n    //定位\n    [LBXPermission authorizeWithType:LBXPermissionType_Location completion:^(BOOL granted, BOOL firstTime) {\n        \n        if (granted) {\n            //TODO\n            //dosth\n        }\n        else if (!firstTime)\n        {\n            //不是第一次请求权限，那么可以弹出权限提示，用户选择设置，即跳转到设置界面，设置权限\n            [LBXPermissionSetting showAlertToDislayPrivacySettingWithTitle:@\"提示\" msg:@\"没有定位权限，是否前往设置\" cancel:@\"取消\" setting:@\"设置\"];\n        }\n    }];\n```\n\n### install by cocoapods\n没有使用到的权限，不要安装，否则Appstore审核不通过\n\n```\n   pod 'LBXPermission/Base'\n   pod 'LBXPermission/Camera'\n   pod 'LBXPermission/Photo'\n   pod 'LBXPermission/Contact'\n   pod 'LBXPermission/Location'\n   pod 'LBXPermission/Reminder'\n   pod 'LBXPermission/Calendar'\n   pod 'LBXPermission/Microphone'\n   pod 'LBXPermission/Health'\n   pod 'LBXPermission/Net'\n   pod 'LBXPermission/Tracking' \n   pod 'LBXPermission/Notification'\n   pod 'LBXPermission/Bluetooth'\n```\n\n### install manually\n将 \"LBXPermissions\" 文件夹拖动你的工程，并删除非必要的权限文件\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxabc%2Flbxpermission","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmxabc%2Flbxpermission","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxabc%2Flbxpermission/lists"}