prp

PRPrivacyManager

All-in-one privacy manager for iOS.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

37

Maintenance

Last Commit

6yrs ago

Contributors

0

Package

Dependencies

0

License

MIT

Categories

Readme

PRPrivacyManager

CocoaPods Language License

Tweet Twitter

All-in-one privacy manager for iOS.

Currently supported:

  • Location Services
  • Contacts
  • Calendars
  • Reminders
  • Photos
  • Bluetooth Sharing
  • Microphone
  • Camera
  • Health
  • HomeKit

Installation

With CocoaPods

In your Podfile:

pod 'PRPrivacyManager'

Usage

Check for Status

PRPrivacyStatus privacyStatus = [PRPrivacyManager privacyStatusForType:PRPrivacyTypeContacts];

Ask for Permission

[PRPrivacyManager authorizeWithType:PRPrivacyTypeContacts
                         completion:^(PRPrivacyStatus status) {
                             // Handle result
                         }];
[PRPrivacyManager authorizeWithType:PRPrivacyTypeLocation
                            subtype:PRPrivacySubtypeWhenInUse
                         completion:^(PRPrivacyStatus status) {
                             // Handle result
                         }];

Available Types

typedef NS_ENUM(NSUInteger, PRPrivacyType) {
    PRPrivacyTypeLocation,
    PRPrivacyTypeContacts,
    PRPrivacyTypePhotos,
    PRPrivacyTypeMicrophone,
    PRPrivacyTypeCamera,
};

Statuses

typedef NS_ENUM(NSUInteger, PRPrivacyStatus) {
    PRPrivacyStatusNotDetermined,
    PRPrivacyStatusRestricted,
    PRPrivacyStatusDenied,
    PRPrivacyStatusAuthorized,
#ifdef __IPHONE_8_0
    PRPrivacyStatusAuthorizedAlways,
    PRPrivacyStatusAuthorizedWhenInUse,
#endif
};

License

This code is distributed under the terms and conditions of the MIT license.

You can support me by:

:-)

Contact

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100