-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide integration points for SpeziNotifications, Swift 6 and silence some warnings #117
Conversation
@Application
in SwiftUI views and additional notifications support
@PSchmiedmayer with moving the package to Swift 6 language mode, it seems that The Swift Compiler seems to emit checks to verify that e.g. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for all the work here; happy to see this merged once the comments are addressed.
We should ensure that we setup the Notifications target in combination with Spezi Scheduler before we tag a new release with this PR 👍
Sources/Spezi/Notifications/Spezi+RegisterRemoteNotificationsAction.swift
Outdated
Show resolved
Hide resolved
Tests/SpeziTests/StandardTests/StandardUnfulfilledConstraintTests.swift
Outdated
Show resolved
Hide resolved
# Introduce SpeziNotifications ## ♻️ Current situation & Problem This PR marks the first release of the SpeziNotifications package. It introduces the `Notifications` Module and introduces two new actions: `notificationSettings` to retrieve the current notification settings (e.g., authorization status) and `requestNotificationAuthorization`. All notification related actions are accessible through the `@Application` property wrapper inside Spezi Modules and the `@Environment` property wrapper inside SwiftUI Views. The `registerRemoteNotifications` and `unregisterRemoteNotifications` actions are now also available via the `@Environment` property wrapper. Some infrastructure is still exported through Spezi (see StanfordSpezi/Spezi#117). ## ⚙️ Release Notes Each target exposes a structured DocC documentation catalog and documents all public interfaces. ## 📚 Documentation * New `@Application(\.notificationSettings)` and `@Environment(\.notificationSettings)` action to retrieve current notification settings like the authorization status. * New `@Application(\.requestNotificationAuthorization)` and `@Environment(\. requestNotificationAuthorization)` action to easily request notification authorization. * New `Notifications` module that makes it easier to interact with notification related actions in Spezi application and ensures to silence concurrency warnings. * New `XCTSpeziNotifications` target to easily handle notification authorization alerts in UI tests. * New `XCTSpeziNotificationsUI` target that can be used in UI test application to visualize pending notification requests. ## ✅ Testing Added extensive unit and UI testing for all components. ## 📝 Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).
Provide integration points for SpeziNotifications, Swift 6 and silence some warnings
♻️ Current situation & Problem
SpeziNotifications (StanfordSpezi/SpeziNotifications#1) is a new framework in the Spezi ecosystem that helps dealing with UserNotifications in your application. Some elements that are currently defined in Spezi are going to move to SpeziNotifications. We will fully move all of this infrastructure in a future breaking release of Spezi. For now, we make sure to have some of the required infrastructure accessible by SpeziNetworking.
The
SpeziNotificationCenterDelegate
and associated protocols will stay for now but can eventually be fully moved to SpeziNotifications. For now, SpeziNotifications will re-export all relevant types so it is easier for users to be prepared for the change.⚙️ Release Notes
registerForRemoteNotifications
.📚 Documentation
--
✅ Testing
--
📝 Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: