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

Allow @Application in SwiftUI views and additional notifications support #117

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

Supereg
Copy link
Member

@Supereg Supereg commented Sep 13, 2024

Allow @Application in SwiftUI views and additional notifications support

♻️ Current situation & Problem

This PR adds support for the @Application property wrapper to be used within the SwiftUI view hierarchy for greater flexibility when implementation Spezi-based applications. For example, this allows to access actions like registerForRemoteNotifications directly in your SwiftUI view.

Additionally, this PR adds two new actions: notificationSettings to retrieve the current notification settings (e.g., authorization status) and requestNotificationAuthorization. Lastly, we added the LocalNotifications module that adds some handy APIs to make interactions with the UNNotificationCenter easier.

⚙️ Release Notes

  • @Application can now be used within a SwiftUI view.
  • New @Application(\.notificationSettings) action to retrieve current notification settings like the authorization status.
  • New @Application(\. requestNotificationAuthorization) action to easily request notification authorization.
  • New LocalNotifications module.

📚 Documentation

Documentation catalog was updated.

✅ Testing

TBA

📝 Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

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.

1 participant