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 stars Tracking Chart

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.

Main metrics

Overview
Name With Ownersmartstore/SmartStoreNET
Primary LanguageC#
Program languageObjective-C (Language Count: 10)
Platform
License:GNU General Public License v3.0
所有者活动
Created At2014-08-13 00:49:19
Pushed At2023-06-27 23:11:09
Last Commit At2021-12-17 14:36:06
Release Count28
Last Release Name4.2.0 (Posted on 2021-12-21 12:56:09)
First Release Name1.2.0 (Posted on 2013-10-09 02:40:31)
用户参与
Stargazers Count2.6k
Watchers Count299
Fork Count1.5k
Commits Count9.2k
Has Issues Enabled
Issues Count2061
Issue Open Count25
Pull Requests Count11
Pull Requests Open Count22
Pull Requests Close Count68
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private