iOS 开发实用技术导航
NSHipster 中文版
› http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
› http://www.cocos2d-iphone.org/
CocoaPods
› http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
› http://code.google.com/mobile/analytics/
WWDC
› https://developer.apple.com/wwdc/
Design Guides and Resources
› https://developer.apple.com/design/
Transcripts of WWDC sessions
› http://asciiwwdc.com
Cocoa with Love
› http://cocoawithlove.com/
Cocoa Dev Central
› http://cocoadevcentral.com/
NSHipster
› http://nshipster.com/
Style Guides
› Google Objective-C Style Guide
› NYTimes Objective-C Style Guide
Useful Tools and Services
› Charles Web Debugging Proxy
› Smore
Elethom
V2EX  ›  iDev

PRPrivacyManager: iOS 上的 all-in-one 權限管理庫. All-in-one privacy manager for iOS. (on CocoaPods)

  •  1
     
  •   Elethom ·
    Elethom · Dec 24, 2014 · 2766 views
    This topic created in 4294 days ago, the information mentioned may be changed or developed.

    又是一個很多年前的輪子. 在很多項目中都有用過, 所以整理出來發佈了一個開源 pod. XD

    View on GitHub

    PRPrivacyManager

    Cocoapods

    All-in-one privacy manager for iOS.

    Currently supported:

    Installation

    With CocoaPods

    In your Podfile:

    pod 'PRPrivacyManager'
    

    Usage

    Check for Status

    PRPrivacyStatus privacyStatus = [PRPrivacyManager privacyStatusForType:PRPrivacyTypeContacts];
    

    Ask for Permission

    [PRPrivacyManager authorizeWithType:PRPrivacyTypeContacts
                             completion:^(TTPrivacyStatus status) {
                                 // Handle result
                             }];
    

    Available Types

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

    Statuses

    typedef NS_ENUM(NSUInteger, PRPrivacyStatus) {
        PRPrivacyStatusNotDetermined,
        PRPrivacyStatusRestricted,
        PRPrivacyStatusDenied,
        PRPrivacyStatusAuthorized
    };
    

    All done! You can check out the code in the demo provided.

    License

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

    Donate

    You can support me by:

    :-)

    Contact

    2 replies  •  2014-12-24 17:52:26 +08:00
    phoenixlzx
        1
    phoenixlzx  
       Dec 24, 2014   ❤️ 1
    给菊苣点个赞.゚٩(๑>◡<๑)۶:.
    lex
        2
    lex  
       Dec 24, 2014
    @livid h2 h3 看上去不如 GitHub 的明显。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1007 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 23:18 · PVG 07:18 · LAX 16:18 · JFK 19:18
    ♥ Do have faith in what you're doing.