From 9564db1cfe2d548e69d6a416f2381c7fc0a18a47 Mon Sep 17 00:00:00 2001 From: Paul Schmiedmayer Date: Thu, 8 Feb 2024 12:20:42 -0800 Subject: [PATCH] Add New HealthKit Data Types (#10) # Add New HealthKit Data Types ## :gear: Release Notes - Adds new HealthKit Data Types ## :pencil: Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/CS342/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/CS342/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/CS342/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/CS342/.github/blob/main/CONTRIBUTING.md). --- ExampleApplication.xcodeproj/project.pbxproj | 4 ---- .../ExampleApplicationDelegate.swift | 8 +++++-- ExampleApplication/VisionProIsCool.swift | 21 ------------------- 3 files changed, 6 insertions(+), 27 deletions(-) delete mode 100644 ExampleApplication/VisionProIsCool.swift diff --git a/ExampleApplication.xcodeproj/project.pbxproj b/ExampleApplication.xcodeproj/project.pbxproj index 8a5a1ac..2bcd4e9 100644 --- a/ExampleApplication.xcodeproj/project.pbxproj +++ b/ExampleApplication.xcodeproj/project.pbxproj @@ -57,7 +57,6 @@ 2FE5DC9929EDD9D9004B9AB4 /* XCTestExtensions in Frameworks */ = {isa = PBXBuildFile; productRef = 2FE5DC9829EDD9D9004B9AB4 /* XCTestExtensions */; }; 2FE5DC9C29EDD9EF004B9AB4 /* XCTHealthKit in Frameworks */ = {isa = PBXBuildFile; productRef = 2FE5DC9B29EDD9EF004B9AB4 /* XCTHealthKit */; }; 2FE5DCB129EE6107004B9AB4 /* AccountOnboarding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FE5DCAC29EE6107004B9AB4 /* AccountOnboarding.swift */; }; - 2FF33BEA2B7302DC0039672F /* VisionProIsCool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FF33BE92B7302DC0039672F /* VisionProIsCool.swift */; }; 2FF53D8B2A8725DE00042B76 /* SpeziMockWebService in Frameworks */ = {isa = PBXBuildFile; productRef = 2FF53D8A2A8725DE00042B76 /* SpeziMockWebService */; }; 2FF53D8D2A8729D600042B76 /* ExampleApplicationStandard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FF53D8C2A8729D600042B76 /* ExampleApplicationStandard.swift */; }; 5661551D2AB8384200209B80 /* SwiftPackageList in Frameworks */ = {isa = PBXBuildFile; productRef = 5661551C2AB8384200209B80 /* SwiftPackageList */; }; @@ -137,7 +136,6 @@ 2FE5DC4D29EDD7FA004B9AB4 /* Bundle+Questionnaire.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Bundle+Questionnaire.swift"; sourceTree = ""; }; 2FE5DC5529EDD811004B9AB4 /* SocialSupportQuestionnaire.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = SocialSupportQuestionnaire.json; sourceTree = ""; }; 2FE5DCAC29EE6107004B9AB4 /* AccountOnboarding.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountOnboarding.swift; sourceTree = ""; }; - 2FF33BE92B7302DC0039672F /* VisionProIsCool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VisionProIsCool.swift; sourceTree = ""; }; 2FF53D8C2A8729D600042B76 /* ExampleApplicationStandard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleApplicationStandard.swift; sourceTree = ""; }; 566155282AB8447C00209B80 /* Package+LicenseType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Package+LicenseType.swift"; sourceTree = ""; }; 5661552D2AB854C000209B80 /* PackageHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PackageHelper.swift; sourceTree = ""; }; @@ -340,7 +338,6 @@ 2F5E32BC297E05EA003432F8 /* ExampleApplicationDelegate.swift */, 2FF53D8C2A8729D600042B76 /* ExampleApplicationStandard.swift */, 2F4E23822989D51F0013F3D9 /* ExampleApplicationTestingSetup.swift */, - 2FF33BE92B7302DC0039672F /* VisionProIsCool.swift */, 2FC975A72978F11A00BA99FE /* Home.swift */, 979EC76B2B631A1800B63213 /* LLMInteraction */, A9720E412ABB68B300872D23 /* Account */, @@ -629,7 +626,6 @@ files = ( 2FE5DC4129EDD7EE004B9AB4 /* StorageKeys.swift in Sources */, 2FE5DCB129EE6107004B9AB4 /* AccountOnboarding.swift in Sources */, - 2FF33BEA2B7302DC0039672F /* VisionProIsCool.swift in Sources */, 2F4FC8D729EE69D300BFFE26 /* MockUpload.swift in Sources */, 2FE5DC3A29EDD7CA004B9AB4 /* Welcome.swift in Sources */, 979EC7732B631A1800B63213 /* LLMInteraction.swift in Sources */, diff --git a/ExampleApplication/ExampleApplicationDelegate.swift b/ExampleApplication/ExampleApplicationDelegate.swift index dd266c8..eef6e48 100644 --- a/ExampleApplication/ExampleApplicationDelegate.swift +++ b/ExampleApplication/ExampleApplicationDelegate.swift @@ -83,8 +83,12 @@ class ExampleApplicationDelegate: SpeziAppDelegate { private var healthKit: HealthKit { HealthKit { - CollectSample( - HKQuantityType(.stepCount), + CollectSamples( + [ + HKQuantityType(.stepCount), + HKQuantityType(.dietaryEnergyConsumed), + HKQuantityType(.dietaryProtein) + ], deliverySetting: .anchorQuery(.afterAuthorizationAndApplicationWillLaunch) ) } diff --git a/ExampleApplication/VisionProIsCool.swift b/ExampleApplication/VisionProIsCool.swift deleted file mode 100644 index 87327e5..0000000 --- a/ExampleApplication/VisionProIsCool.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// This source file is part of the Example Application based on the Stanford Spezi Template Application project -// -// SPDX-FileCopyrightText: 2023 Stanford University -// -// SPDX-License-Identifier: MIT -// - -import SwiftUI - - -struct VisionProIsCool: View { - var body: some View { - Image(systemName: "visionpro") - } -} - - -#Preview { - VisionProIsCool() -}