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: about 1 month 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 (about 1 year ago)
- Last Synced: 2024-10-14T07:10:01.299Z (3 months ago)
- Language: Swift
- Size: 6.84 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)