Skip to content

Improve notification APIs and stabilize CI#8

Merged
timokoethe merged 3 commits into
mainfrom
development
Jun 20, 2026
Merged

Improve notification APIs and stabilize CI#8
timokoethe merged 3 commits into
mainfrom
development

Conversation

@timokoethe

Copy link
Copy Markdown
Owner

Summary

  • Add Swift-friendly API names for throwing authorization and pending notification IDs
  • Keep existing API names as deprecated compatibility wrappers
  • Add delivered notification fetch and removal helpers
  • Update README examples for the new APIs
  • Expand test coverage for delivered notification handling
  • Remove visionOS from the CI build matrix
  • Pin CI to macOS 15 with Xcode 16.4 and remove the separate Swift toolchain setup

Introduce an async, throwable API and dependency-injectable UNUserNotificationCenter: add UserNotificationCenter protocol, make NotificationManager use an overridable center, add NotificationManagerError validations (invalidTimeInterval, repeatingTimeIntervalTooShort, triggerDateMustBeInFuture), and provide async scheduling, replace, badge and fetch methods with synchronous fire-and-forget wrappers. Add comprehensive unit tests (TestNotificationCenter + tests) and remove the old empty authorization test. Update CI workflows to run a platform matrix with xcodebuild and PR triggers, rename test job, and add SDK skipping logic. Expand README with usage examples, badges and docs. Minor Package.swift formatting tweaks.
Introduce support for delivered notifications: add UserNotificationCenter.deliveredNotifications(), removeDeliveredNotifications(withIdentifiers:), NotificationManager.getDeliveredNotifications(), and NotificationManager.getDeliveredNotificationIDs(); update TestNotificationCenter and add helpers for delivered notification tests. Rename requestAuthorizationThrowable() to requestAuthorizationThrowing() and getPendingNotificationRequestsIds() to getPendingNotificationRequestIDs(), preserving the old names as deprecated wrappers. Update README examples to reflect the new API names and show delivered notification usage. Also remove the visionOS job from the GitHub Actions build workflow and update unit tests accordingly.
Change GitHub Actions workflows to run on macos-15 and add a step to select Xcode 16.4 (/Applications/Xcode_16.4.app). The test workflow drops the swift-actions/setup-swift step and relies on the Xcode selection so tests run with the desired toolchain. This ensures consistent macOS/Xcode environment for builds and tests.
@timokoethe timokoethe self-assigned this Jun 20, 2026
@timokoethe timokoethe added the enhancement New feature or request label Jun 20, 2026
@timokoethe timokoethe merged commit 5c4a1ef into main Jun 20, 2026
6 checks passed
@timokoethe timokoethe deleted the development branch June 20, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant