CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Aug 2016 |
Maintained by Joe Laws.
iOS 7.0+
Only add the pod for the permissions you plan on using. Apple rejects apps that include Healthkit API's but do not use them.
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;
Here is a list of iPhone apps utilizing this library (let me know if you want your app added):
JLPermissions is available under the MIT license. See the LICENSE file for more info.