Latest 1.0.0-beta.1
Homepage https://github.com/sunshinejr/RxPermission
License MIT
Platforms ios 8.0
Dependencies Permission, RxSwift
Authors

CocoaPods
Swift 3.0.x
License
Platform

RxSwift bindings for Permission API that helps you with Permissions in iOS.

Installation

RxPermission is available through CocoaPods. I can’t guarantee it is working correctly
on Carthage, so if you want to help I’m happy to introduce it with your PR.

RxPermission should work with every Swift release >= 2.2, for detailed instructions check
info below.

Swift 3.0

If you want to use RxPermission with Swift 3.0, as of now you have to use these lines below
in your Podfile to have it working (while waiting for the official release of Permission and RxSwift):

pod 'RxPermission', '1.0.0-beta.1'
pod 'Permission', :git => 'https://github.com/delba/Permission', :branch => 'swift-3.0'
pod 'RxSwift', :git => 'https://github.com/ReactiveX/RxSwift'

Below Swift 3.0

To install it, simply add the following line to your Podfile:

pod "RxPermission", "~> 0.2"

Usage

RxPermission makes a rx_permission Observable that you can subscribe in order to receive signals.

Sample code

Permission
    .Contacts
    .rx_permission
    .subscribeNext { status in
        print("Status: (status)")
    }
    .addDisposableTo(disposeBag)

Available permissions:

public enum PermissionType {
    case Contacts
    case LocationAlways
    case LocationWhenInUse
    case Notifications
    case Microphone
    case Camera
    case Photos
    case Reminders
    case Events
    case Bluetooth
    case Motion
}

Available statuses:

public enum PermissionStatus {
    case Authorized
    case Denied
    case Disabled
    case NotDetermined
}

For more info about permissions and statuses, please visit Permission’s README.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Author

Sunshinejr, [email protected], @thesunshinejr

License

RxPermission is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "RxPermission",
    "version": "1.0.0-beta.1",
    "summary": "RxSwift bindings for Permissions API in iOS.",
    "description": "RxSwift binding for [Permission](https://github.com/delba/Permission) API that helps you with Permissions in iOS.",
    "homepage": "https://github.com/sunshinejr/RxPermission",
    "license": "MIT",
    "authors": {
        "u0141ukasz Mru00f3z": "[email protected]"
    },
    "source": {
        "git": "https://github.com/sunshinejr/RxPermission.git",
        "tag": "1.0.0-beta.1"
    },
    "social_media_url": "https://twitter.com/thesunshinejr",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Source/*.swift",
    "dependencies": {
        "Permission": [],
        "RxSwift": []
    }
}

Pin It on Pinterest

Share This