Need help with JLPermissions?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

jlaws
413 Stars 53 Forks MIT License 115 Commits 3 Opened issues

Description

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.

Services available

!
?

Need anything else?

Contributors list

# 180,963
Objecti...
C++
carthag...
cocoapo...
58 commits
# 274,130
Objecti...
Swift
macOS
wwdc
14 commits
# 13,654
watchos
Objecti...
regular...
phone-n...
6 commits
# 9,615
Swift
travis
bitbuck...
rxswift
5 commits
# 84,180
Objecti...
Java
React N...
3 commits
# 211,310
Swift
CSS
web-dev...
macOS
1 commit
# 65,161
Swift
Objecti...
Shell
realmsw...
1 commit
# 32,841
Objecti...
PureScr...
deoplet...
Xcode
1 commit
# 162,804
Swift
uialert...
carthag...
cocoapo...
1 commit

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.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.