JLPermissions

An iOS pre-permissions utility that lets developers ask users on their own dialog for calendar, contacts, location, photos, reminders, twitter, push notifications and more, before making the system-based permission request.

Github星跟蹤圖

JLPermissions

Version
Platform

Requirements

iOS 8.0+

Installation

JLPermissions is available through CocoaPods, to install it simply add any or all of the following lines to your Podfile:

pod "JLPermissions/Calendar"
pod "JLPermissions/Camera"
pod "JLPermissions/Contacts"
pod "JLPermissions/Facebook"
pod "JLPermissions/Health"
pod "JLPermissions/Location"
pod "JLPermissions/Microphone"
pod "JLPermissions/Notification"
pod "JLPermissions/Photos"
pod "JLPermissions/Reminders"
pod "JLPermissions/Twitter" 

Only add the pod for the permissions you plan on using. Apple rejects apps that include Healthkit API's but do not use them.

Usage

To run the example project; clone the repo, and run pod install, then open JLPermissionsExample.xcworkspace.

The method for asking for each type of permission (other than push notifications) is virtually identical. Here is an example of the API:


typedef NS_ENUM(NSInteger, JLAuthorizationStatus) {
  JLPermissionNotDetermined = 0,
  JLPermissionDenied,
  JLPermissionAuthorized
};

typedef void (^AuthorizationHandler)(bool granted, NSError *error);

- (JLAuthorizationStatus)authorizationStatus;
- (void)authorize:(AuthorizationHandler)completion;
- (void)authorizeWithTitle:(NSString *)messageTitle
                   message:(NSString *)message
               cancelTitle:(NSString *)cancelTitle
                grantTitle:(NSString *)grantTitle
                completion:(AuthorizationHandler)completion;
- (void)displayErrorDialog;

License

JLPermissions is available under the MIT license. See the LICENSE file for more info.

主要指標

概覽
名稱與所有者smartstore/SmartStoreNET
主編程語言C#
編程語言Objective-C (語言數: 10)
平台
許可證GNU General Public License v3.0
所有者活动
創建於2014-08-13 00:49:19
推送於2023-06-27 23:11:09
最后一次提交2021-12-17 14:36:06
發布數28
最新版本名稱4.2.0 (發布於 2021-12-21 12:56:09)
第一版名稱1.2.0 (發布於 2013-10-09 02:40:31)
用户参与
星數2.6k
關注者數299
派生數1.5k
提交數9.2k
已啟用問題?
問題數2061
打開的問題數25
拉請求數11
打開的拉請求數22
關閉的拉請求數68
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?