Skip to content
This repository has been archived by the owner on Mar 6, 2018. It is now read-only.

Commit

Permalink
[README] Update with examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshinejr committed Apr 16, 2016
1 parent bb66155 commit 8bc02e4
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,46 @@ pod "RxPermission"

## Usage

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

### Sample code
```swift
Permission
.Contacts
.rx_permission
.subscribeNext { status in
print("Status: \(status)")
}
.addDisposableTo(disposeBag)
```

### Available permissions:
```swift
case .Contacts
case .LocationAlways:
case .LocationWhenInUse:
case .Notifications:
case .Microphone:
case .Camera:
case .Photos:
case .Reminders:
case .Events:
case .Bluetooth:
case .Motion:
```

### Available statuses:
```swift
case Authorized
case Denied
case Disabled
case NotDetermined
```

For more info about permissions and statuses, please visit [Permission's README](https://github.com/delba/Permission#permission).

## Example

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

## Author
Expand Down

0 comments on commit 8bc02e4

Please sign in to comment.