All Projects → sunshinejr → Rxpermission

sunshinejr / Rxpermission

Licence: mit
RxSwift bindings for Permissions API in iOS.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Rxpermission

Github.swift
Unofficial GitHub API client in Swift
Stars: ✭ 171 (-26.92%)
Mutual labels:  rxswift
Rxreachability
RxSwift bindings for Reachability
Stars: ✭ 181 (-22.65%)
Mutual labels:  rxswift
Dllspy
DLL Hijacking Detection Tool
Stars: ✭ 202 (-13.68%)
Mutual labels:  permission
Rxiglistkit
IGListKit with RxSwift🚀
Stars: ✭ 174 (-25.64%)
Mutual labels:  rxswift
Reactorkit
A library for reactive and unidirectional Swift applications
Stars: ✭ 2,237 (+855.98%)
Mutual labels:  rxswift
Voice Overlay Android
🗣 An overlay that gets your user’s voice permission and input as text in a customizable UI
Stars: ✭ 189 (-19.23%)
Mutual labels:  permission
Moyasugar
🍯 Syntactic sugar for Moya
Stars: ✭ 165 (-29.49%)
Mutual labels:  rxswift
Recaptcha
[In]visible ReCaptcha v2 for iOS
Stars: ✭ 208 (-11.11%)
Mutual labels:  rxswift
Modernavplayer
ModernAVPlayer is a persistence AVPlayer wrapper
Stars: ✭ 179 (-23.5%)
Mutual labels:  rxswift
Zhuishushenqi
追书神器Swift版客户端(非官方)。 不断更新中......
Stars: ✭ 196 (-16.24%)
Mutual labels:  rxswift
Rxgrdb
Reactive extensions for SQLite
Stars: ✭ 176 (-24.79%)
Mutual labels:  rxswift
100 Days Of Rxswift
💨100 days and 40 project of RxSwift
Stars: ✭ 177 (-24.36%)
Mutual labels:  rxswift
Rxkingfisher
Reactive extension for the Kingfisher image downloading and caching library
Stars: ✭ 190 (-18.8%)
Mutual labels:  rxswift
Xxpermissions
Android 权限请求框架,已适配 Android 12
Stars: ✭ 2,971 (+1169.66%)
Mutual labels:  permission
Vue Blog
🎉 基于vue全家桶 + element-ui 构建的一个后台管理集成解决方案
Stars: ✭ 208 (-11.11%)
Mutual labels:  permission
Swifthub
GitHub iOS client in RxSwift and MVVM-C clean architecture
Stars: ✭ 2,330 (+895.73%)
Mutual labels:  rxswift
Moya
Network abstraction layer written in Swift.
Stars: ✭ 13,607 (+5714.96%)
Mutual labels:  rxswift
Lockwise Ios
Firefox's Lockwise app for iOS
Stars: ✭ 224 (-4.27%)
Mutual labels:  rxswift
V2ex
An iOS client written in Swift for V2EX
Stars: ✭ 208 (-11.11%)
Mutual labels:  rxswift
Easypermission
一个非常轻便而且可用的Android动态权限申请库
Stars: ✭ 192 (-17.95%)
Mutual labels:  permission

RxPermission

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 you have to specify which Permission you want to install/use because of new Apple policy about permission. For example if you want to access the Camera and the Notifications you define the following:

pod 'RxPermission/Camera'
pod 'RxPermission/Notifications'

Available specs:

pod 'RxPermission/AddressBook'
pod 'RxPermission/Bluetooth'
pod 'RxPermission/Camera'
pod 'RxPermission/Contacts'
pod 'RxPermission/Events'
pod 'RxPermission/Location'
pod 'RxPermission/MediaLibrary'
pod 'RxPermission/Microphone'
pod 'RxPermission/Motion'
pod 'RxPermission/Notifications'
pod 'RxPermission/Photos'
pod 'RxPermission/Reminders'
pod 'RxPermission/Siri'
pod 'RxPermission/SpeechRecognizer'

Below Swift 3.0

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

pod "RxPermission", "~> 0.2"

You need to also take care of Info.plist messages because otherwise Apple won't accept the app in App Store.

Usage

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

Sample code

Permission
    .contacts
    .rx.permission
    .subscribe(onNext: { status in
        print("Status: \(status)")
    })
    .addDisposableTo(disposeBag)

Available permissions:

public enum PermissionType {
    case addressBook
    case bluetooth
    case camera    
    case contacts
    case events
    case locationAlways
    case locationWhenInUse
    case mediaLibrary
    case microphone
    case motion
    case notifications
    case photos
    case reminders
    case siri
    case speechRecognizer
}

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].