diff --git a/LLMonFHIR.xcodeproj/project.pbxproj b/LLMonFHIR.xcodeproj/project.pbxproj index a387740..7ffae4a 100644 --- a/LLMonFHIR.xcodeproj/project.pbxproj +++ b/LLMonFHIR.xcodeproj/project.pbxproj @@ -428,7 +428,7 @@ attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1340; - LastUpgradeCheck = 1510; + LastUpgradeCheck = 1530; TargetAttributes = { 653A254C283387FE005D4D48 = { CreatedOnToolsVersion = 13.4; @@ -688,11 +688,11 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; - SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; "SWIFT_ELicenseRef-LLMonFHIR_LOC_STRINGS" = YES; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 1; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Test; }; @@ -891,11 +891,11 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; - SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; "SWIFT_ELicenseRef-LLMonFHIR_LOC_STRINGS" = YES; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 1; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; @@ -940,11 +940,11 @@ "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "LLM on FHIR"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTS_MACCATALYST = NO; - SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES; "SWIFT_ELicenseRef-LLMonFHIR_LOC_STRINGS" = YES; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = 1; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; diff --git a/LLMonFHIR.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/LLMonFHIR.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 209272d..209dde5 100644 --- a/LLMonFHIR.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/LLMonFHIR.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,4 +1,5 @@ { + "originHash" : "492223cc8959b40571851f634503febc2f994cab9f439437a2002b77d2fda831", "pins" : [ { "identity" : "fhirmodels", @@ -14,8 +15,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordBDHG/HealthKitOnFHIR.git", "state" : { - "revision" : "825e96007d83ed83f81ee49eb3ebab29d7b7ba2f", - "version" : "0.2.5" + "revision" : "00d64d38a8f0d826ee9e27b6f3ce32314a29fd3e", + "version" : "0.2.6" } }, { @@ -23,8 +24,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordBDHG/llama.cpp", "state" : { - "revision" : "b0611c7d3cb049822f9911878514e4706b80e2ac", - "version" : "0.1.8" + "revision" : "7bfd6d4b5bbc9fd47bd023bdbb35f96c827977f3", + "version" : "0.2.1" } }, { @@ -36,22 +37,13 @@ "version" : "0.2.6" } }, - { - "identity" : "semaphore", - "kind" : "remoteSourceControl", - "location" : "https://github.com/groue/Semaphore.git", - "state" : { - "revision" : "f1c4a0acabeb591068dea6cffdd39660b86dec28", - "version" : "0.0.8" - } - }, { "identity" : "spezi", "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordSpezi/Spezi", "state" : { - "revision" : "0ced3efbc2af9513c07ac913ad762c773a00a6c8", - "version" : "1.2.1" + "revision" : "c43e4fa3d3938a847de2b677091a34ddaea5bc76", + "version" : "1.2.3" } }, { @@ -59,8 +51,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordSpezi/SpeziChat", "state" : { - "revision" : "eae5c15b211f18e09aa98de63ce119629320afeb", - "version" : "0.1.8" + "revision" : "2334583105224b0c04fc36989db82b000021d31d", + "version" : "0.1.9" } }, { @@ -77,8 +69,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordSpezi/SpeziFoundation", "state" : { - "revision" : "0346857e2f1d6fd4b1d950d271be6c82df97107f", - "version" : "1.0.2" + "revision" : "01af5b91a54f30ddd121258e81aff2ddc2a99ff9", + "version" : "1.0.4" } }, { @@ -86,8 +78,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordSpezi/SpeziHealthKit.git", "state" : { - "revision" : "b40695ffa4d1c9d58c5a0ee277640c2343fb5516", - "version" : "0.5.1" + "revision" : "1e9cb5a6036ac7f4ff37ea1c3ed4898103339ad1", + "version" : "0.5.3" } }, { @@ -95,8 +87,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordSpezi/SpeziLLM", "state" : { - "revision" : "6892c5dfe258371b6f3287f02b8fec57a611ba70", - "version" : "0.7.0" + "revision" : "dc37b91ed55c9d50eaf58e645d454cb62e3681d1", + "version" : "0.7.2" } }, { @@ -104,8 +96,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordSpezi/SpeziOnboarding.git", "state" : { - "revision" : "91463ae190611bd14ef52b0657e8db3bf53c9ae8", - "version" : "1.1.0" + "revision" : "4971a82e94996ce0c3d8ecf64fdeec874a1f20d6", + "version" : "1.1.1" } }, { @@ -113,17 +105,17 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordSpezi/SpeziSpeech", "state" : { - "revision" : "a1e1d021d8f605b5e6b23aee773115d7125a57e3", - "version" : "1.0.0" + "revision" : "60b8cdbf6f3d58b0d75eadf30db50f88848069aa", + "version" : "1.0.1" } }, { "identity" : "spezistorage", "kind" : "remoteSourceControl", - "location" : "https://github.com/StanfordSpezi/SpeziStorage", + "location" : "https://github.com/StanfordSpezi/SpeziStorage.git", "state" : { - "revision" : "eaed2220375c35400aa69d1f96a8d32b7e66b1c7", - "version" : "1.0.0" + "revision" : "b958df9b31f24800388a7bfc28f457ce7b82556c", + "version" : "1.0.2" } }, { @@ -131,8 +123,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordSpezi/SpeziViews.git", "state" : { - "revision" : "d49f716e4a4d634604bb0dcd6d53df679b6c1358", - "version" : "1.3.0" + "revision" : "4d2a724d97c8f19ac7de7aa2c046b1cb3ef7b279", + "version" : "1.3.1" } }, { @@ -172,5 +164,5 @@ } } ], - "version" : 2 + "version" : 3 } diff --git a/LLMonFHIR.xcodeproj/xcshareddata/xcschemes/LLMonFHIR.xcscheme b/LLMonFHIR.xcodeproj/xcshareddata/xcschemes/LLMonFHIR.xcscheme index 94ffd93..5492c12 100644 --- a/LLMonFHIR.xcodeproj/xcshareddata/xcschemes/LLMonFHIR.xcscheme +++ b/LLMonFHIR.xcodeproj/xcshareddata/xcschemes/LLMonFHIR.xcscheme @@ -1,6 +1,6 @@ { + + @MainActor private var useHealthKitResources: Binding { Binding( get: { - if FeatureFlags.mockPatients { + if !HKHealthStore.isHealthDataAvailable() { showBundleSelection = true return false } @@ -38,9 +40,11 @@ struct ResourceSelection: View { var body: some View { Form { - Section { - Toggle(isOn: useHealthKitResources) { - Text("Use HealthKit Resources") + if HKHealthStore.isHealthDataAvailable() { + Section { + Toggle(isOn: useHealthKitResources) { + Text("Use HealthKit Resources") + } } .onChange(of: useHealthKitResources.wrappedValue, initial: true) { if useHealthKitResources.wrappedValue { @@ -73,11 +77,9 @@ struct ResourceSelection: View { } } .task { + showBundleSelection = !standard.useHealthKitResources || !HKHealthStore.isHealthDataAvailable() self.bundles = await mockPatients } - .onAppear { - showBundleSelection = !standard.useHealthKitResources - } .navigationTitle(Text("Resource Settings")) } diff --git a/LLMonFHIR/SharedContext/FeatureFlags.swift b/LLMonFHIR/SharedContext/FeatureFlags.swift index 0493eda..7284411 100644 --- a/LLMonFHIR/SharedContext/FeatureFlags.swift +++ b/LLMonFHIR/SharedContext/FeatureFlags.swift @@ -14,6 +14,4 @@ enum FeatureFlags { static let showOnboarding = CommandLine.arguments.contains("--showOnboarding") /// Sets the application in test mode static let testMode = CommandLine.arguments.contains("--testMode") - /// Use mock patients - static let mockPatients = CommandLine.arguments.contains("--mockPatients") }