generated from StanfordBDHG/SwiftPackageTemplate
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Query Property Wrappers, HealthChart, and Other Refactoring (#27)
# query property wrappers, HealthChart, other refactoring ## ♻️ 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 requires StanfordBDHG/XCTestExtensions#28 ## ⚙️ Release Notes - Added `HealthKitQuery` property wrapper - Added `HealthKitStatisticsQuery` property wrapper - Added `HealthKitCharacteristicQuery` property wrapper - Added `HealthChart` view - Extended `HealthKit` configuration API to allow users to specify sample types the system should request read and/or write access to - Removed `CollectSamples`. The same functionality can be achieved using a `for` loop creating individual `CollectSample` instances. ## 📚 Documentation All added new and changed existing APIs are documented. The DocC structure was reworked and some key aspects of SpeziHealthKit now have dedicated article/extension pages. ## ✅ Testing The new and changed APIs are tested using both "normal" unit tests and UI tests. Existing tests were kept and adapted where possible ## 📝 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).
- Loading branch information
1 parent
79ee967
commit 90575b7
Showing
90 changed files
with
6,565 additions
and
1,234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
|
||
Files: Tests/SpeziHealthKitTests/__Snapshots__/* | ||
Copyright: 2025 Stanford University and the project authors (see CONTRIBUTORS.md) | ||
License: MIT | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ builder: | |
- platform: ios | ||
documentation_targets: | ||
- SpeziHealthKit | ||
- SpeziHealthKitUI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.