JLPermissions 2.2.10

JLPermissions 2.2.10

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Aug 2016

Maintained by Joe Laws.



  • By
  • Joe Laws

Requirements

iOS 7.0+

Installation

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;

Author

Projects

Here is a list of iPhone apps utilizing this library (let me know if you want your app added):

License

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