Closed Supereg closed 8 months ago
@PSchmiedmayer make sense. Great catch. I restructured the SchedulerStorage
module to be an independent module that you can configure from the outside (via an SPI import). Pretty sweet I think. Added logging to properly communicate if nothing is saved or restored.
I made some additional changes in this PR that (1) fixes some issues around Equatable (and therefore doesn't update our ScheduleView
in the template application) and (2) updated everything to the latest changes in Spezi (e.g., LifecycleHandler deprecation and new NotificationHandler protocol).
Attention: Patch coverage is 86.58537%
with 11 lines
in your changes are missing coverage. Please review.
Project coverage is 86.51%. Comparing base (
ba39108
) to head (0fb5d21
).
Disable persistent storage of Tasks in simulator
:recycle: Current situation & Problem
We found it overly complicated to deal with SpeziScheduler in the development process (e.g., testing changes within the simulator or running unit tests against a scheduler implementation). This PR changes the SchedulerStorage component to not interact with the local storage if running within a simulator environment. This should allow for more rapid development (e.g., no requirement to delete the app in between startups) and help in unit testing scenarios.
Additionally, this PR fixes the Equatable implementation of the
Scheduler
module.Lastly, we update to the latest Spezi release and remove usage of the
LifecycleHandler
and avoid directly interfacing with the NotificationDelegate. This ensure that we don't override the Notification Center delegate from someone else and, most importantly, only respond to notifications the scheduler sent.:gear: Release Notes
Scheduler
.LifecycleHandler
implementation with SwiftUI native mechanisms.:books: Documentation
--
:white_check_mark: Testing
--
:pencil: Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: