Improve notification APIs and stabilize CI#8
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary