Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/raxityo/rxusernotifications
https://github.com/raxityo/rxusernotifications
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/raxityo/rxusernotifications
- Owner: raxityo
- License: mit
- Created: 2021-04-05T20:12:18.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-08T22:46:33.000Z (11 months ago)
- Last Synced: 2023-12-08T23:33:01.758Z (11 months ago)
- Language: Swift
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)