https://github.com/artoria2e5/prprivacymanager
All-in-one privacy manager for iOS.
https://github.com/artoria2e5/prprivacymanager
Last synced: about 1 month ago
JSON representation
All-in-one privacy manager for iOS.
- Host: GitHub
- URL: https://github.com/artoria2e5/prprivacymanager
- Owner: Artoria2e5
- License: mit
- Created: 2015-11-13T04:02:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-21T03:21:26.000Z (over 9 years ago)
- Last Synced: 2025-02-17T15:52:14.224Z (4 months ago)
- Language: Objective-C
- Homepage:
- Size: 227 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PRPrivacyManager
[](http://cocoapods.org/?q=PRPrivacyManager)
## General
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](http://opensource.org/licenses/MIT).
## Donate
You can support me by:
* sending me iTunes Gift Cards;
* via [Alipay](https://www.alipay.com): [email protected]
* via [PayPal](https://www.paypal.com): [email protected]:-)
## Contact
* [Telegram](https://telegram.org): [@elethom](http://telegram.me/elethom)
* [Email](mailto:[email protected])
* [Twitter](https://twitter.com/elethomhunter)
* [Blog](http://blog.projectrhinestone.org)