Latest 0.2
Homepage https://github.com/Elethom/PRPrivacyManager
License MIT
Platforms ios , requires ARC
Authors

CocoaPods
Language
License

Tweet
Twitter

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

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.

Donate

You can support me by:

:-)

Contact

Latest podspec

{
    "name": "PRPrivacyManager",
    "version": "0.2",
    "summary": "All-in-one privacy manager for iOS.",
    "homepage": "https://github.com/Elethom/PRPrivacyManager",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Elethom Hunter": "[email protected]"
    },
    "social_media_url": "http://twitter.com/ElethomHunter",
    "platforms": {
        "ios": null
    },
    "source": {
        "git": "https://github.com/Elethom/PRPrivacyManager.git",
        "tag": "0.2"
    },
    "source_files": "Classes/*.{h,m}",
    "public_header_files": "Classes/*.h",
    "requires_arc": true
}

Pin It on Pinterest

Share This