[WIP] query property wrappers, concepts of a HealthChart #27
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.
[WIP] query property wrappers, concepts of a HealthChart
♻️ Current situation & Problem
The HealthKit module currently only provides access to HealthKit data via long-running anchor queries that deliver information about new/deleted objects to the app's Standard.
It does not provide any facilities for querying for past samples, or accessing health data from SwiftUI. This PR attempts to address these issues.
Furthermore, the HealthKit module is lacking an API allowing spezi users to integrate custom HealthKit permission requests into the module's permission handling (i.e., you currently can only request HealthKit access for some specific sample type by actively defining a long-running observer for that sample type).
Furthermore, this PR attempts to implement a
HealthChart
view, which can display various types of queried HealthKit data as a chart.resolves #8
requires StanfordSpezi/SpeziFoundation#19
⚙️ Release Notes
HealthKitQuery
property wrapperHealthKitStatisticsQuery
property wrapperHealthKitCharacteristicQuery
property wrapperHealthChart
viewHealthKit
configuration API to allow users to specify sample types the system should request read and/or write access toCollectSamples
. The same functionality can be achieved using afor
loop creating individualCollectSample
instances.📚 Documentation
The documentation is still WIP and is currently being reworked.
Some of the new APIs are already partly documented.
✅ Testing
There currently are no tests for the new APIs. Tests will be added once the API is finalised and the key components are implemented.
📝 Code of Conduct & Contributing Guidelines
By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines: