PRPrivacyManager 0.2

PRPrivacyManager 0.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jan 2015

Maintained by Elethom Hunter.



All-in-one privacy manager for iOS.

Currently supported:

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

Installation

Usage

Check for Status

PRPrivacyStatus privacyStatus = [PRPrivacyManager privacyStatusForType:PRPrivacyTypeContacts];

Ask for Permission

[PRPrivacyManager authorizeWithType:PRPrivacyTypeContacts
                         completion:^(TTPrivacyStatus status) {
                             // Handle result
                         }];
[PRPrivacyManager authorizeWithType:PRPrivacyTypeLocation
                            subtype:PRPrivacySubtypeWhenInUse
                         completion:^(TTPrivacyStatus 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.

Donate

You can support me by:

:-)

Contact