Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/raxityo/rxusernotifications


https://github.com/raxityo/rxusernotifications

Last synced: 25 days ago
JSON representation

Awesome Lists containing this project

README

        

# RxUserNotifications

Rx wrapper around `UserNotifications`.

## Usage:
- Get notification settings:

```swift
UNUserNotificationCenter.rx
.notificationSettings()
.observe(on: MainScheduler.instance)
.subscribe(
onNext: { settings in print(settings) }
)
```
- Request authorization:

```swift
UNUserNotificationCenter.rx
.requestAuthorization(options: [.alert, .sound, .badge])
.observe(on: MainScheduler.instance)
.subscribe(
onNext: { settings in print(settings) }
)
```

Author: [@raxityo](https://github.com/raxityo)