Skip to content
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

Introduce SpeziNotifications #1

Merged
merged 11 commits into from
Oct 28, 2024
Merged

Introduce SpeziNotifications #1

merged 11 commits into from
Oct 28, 2024

Conversation

Supereg
Copy link
Member

@Supereg Supereg commented Sep 28, 2024

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 and Contributing Guidelines:

@Supereg Supereg marked this pull request as ready for review September 30, 2024 13:21
Copy link

codecov bot commented Sep 30, 2024

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

README.md Outdated Show resolved Hide resolved
Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing job with the initial setup; the testing targets and UI are amazing!!

Happy to see this merged and feel free to do the SPI setup 👍
I can do the Zenodo setup once we have tagged a first release 🚀

.spi.yml Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@Supereg Supereg merged commit 38fcb2b into main Oct 28, 2024
12 checks passed
@Supereg Supereg deleted the feature/initial-version branch October 28, 2024 18:32
Supereg added a commit to StanfordSpezi/Spezi that referenced this pull request Oct 28, 2024
…e some warnings (#117)

# 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 
* Deprecated the remote notifications actions declared on Spezi.
SpeziNotifications declares the exact same actions.
* Allow SpeziNotifications to receive the delegate calls that are made
after calling `registerForRemoteNotifications`.
* Move the Package to the Swift 6 toolchain.
* Silence some deprecation warnings through some visibility tricks.


## 📚 Documentation
--


## ✅ Testing
--


## 📝 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).
leej200100 pushed a commit to leej200100/Spezi that referenced this pull request Oct 30, 2024
…e some warnings (#117)

# 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 
* Deprecated the remote notifications actions declared on Spezi.
SpeziNotifications declares the exact same actions.
* Allow SpeziNotifications to receive the delegate calls that are made
after calling `registerForRemoteNotifications`.
* Move the Package to the Swift 6 toolchain.
* Silence some deprecation warnings through some visibility tricks.


## 📚 Documentation
--


## ✅ Testing
--


## 📝 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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants