diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 08e8a86..a64997c 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -54,7 +54,6 @@ jobs: with: artifactname: TemplateApplication.xcresult runsonlabels: '["macOS", "self-hosted"]' - setupSimulators: true setupfirebaseemulator: true customcommand: "firebase emulators:exec 'fastlane test'" uploadcoveragereport: diff --git a/README.md b/README.md index 30fd08a..3cf585a 100644 --- a/README.md +++ b/README.md @@ -29,17 +29,17 @@ The following screenshots show a wide variety of features based on Spezi Modules |:--:|:--:|:--:| |Welcome View|Interesting Modules|Consent Signature| -|![HealthKit Onboarding Flow](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/HealthKitAccess.png#gh-light-mode-only) ![HealthKit Onboarding Flow](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/HealthKitAccess~dark.png#gh-dark-mode-only)|![Permissions screen of the HealthKit framework](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/HealthKitSheet.png#gh-light-mode-only) ![Permissions screen of the HealthKit framework](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/HealthKitSheet~dark.png#gh-dark-mode-only)|![A screen displaying the Scheduler UI.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Schedule.png#gh-light-mode-only) ![A screen displaying the Scheduler UI.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Schedule~dark.png#gh-dark-mode-only) +|![HealthKit Onboarding Flow](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/HealthKitAccess.png#gh-light-mode-only) ![HealthKit Onboarding Flow](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/HealthKitAccess~dark.png#gh-dark-mode-only)|![Permissions screen of the HealthKit framework](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/HealthKitSheet.png#gh-light-mode-only) ![Permissions screen of the HealthKit framework](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Onboarding/HealthKitSheet~dark.png#gh-dark-mode-only)|![Onboarding screen showing the Notifications permission screen.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Notifications.png#gh-light-mode-only) ![Onboarding screen showing the Notifications permission screen.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Notifications~dark.png#gh-dark-mode-only)| |:--:|:--:|:--:| -|HealthKit Access|Granular HealthKit Share Control|Schedule Tasks| +|HealthKit Access|Granular HealthKit Share Control|Trigger Local Notifications| -|![Onboarding screen showing the Notifications permission screen.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Notifications.png#gh-light-mode-only) ![Onboarding screen showing the Notifications permission screen.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Notifications~dark.png#gh-dark-mode-only)|![A screen showing a questionnaire using ResearchKit.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Questionnaire.png#gh-light-mode-only) ![A screen showing a questionnaire using ResearchKit.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Questionnaire~dark.png#gh-dark-mode-only)|![The scheduler screen showing the completed UI](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/ScheduleComplete.png#gh-light-mode-only) ![The scheduler screen showing the completed UI](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/ScheduleComplete~dark.png#gh-dark-mode-only) +|![A screen displaying the Scheduler UI.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Schedule.png#gh-light-mode-only) ![A screen displaying the Scheduler UI.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Schedule~dark.png#gh-dark-mode-only)|![A screen showing a questionnaire using ResearchKit.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Questionnaire.png#gh-light-mode-only) ![A screen showing a questionnaire using ResearchKit.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/Questionnaire~dark.png#gh-dark-mode-only)|![The scheduler screen showing the completed UI](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/ScheduleComplete.png#gh-light-mode-only) ![The scheduler screen showing the completed UI](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Schedule/ScheduleComplete~dark.png#gh-dark-mode-only)| |:--:|:--:|:--:| -|Trigger Local Notifications|Display Questionnaires|Keep Track of Tasks| +|Schedule Tasks|Display Questionnaires|Keep Track of Tasks| -|![A screen displaying the Contact UI.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Context/Contacts.png#gh-light-mode-only) ![A screen displaying the Contact UI.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Context/Contacts~dark.png#gh-dark-mode-only)|![License information to list all used Swift Packages](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Context/License.png#gh-light-mode-only) ![License information to list all used Swift Packages](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Context/License~dark.png#gh-dark-mode-only)|![User Interface of the Mock Web Service](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Context/Request.png#gh-light-mode-only) ![User Interface of the Mock Web Service](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Context/Request~dark.png#gh-dark-mode-only) +|![A screen displaying the Contact UI.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Context/Contacts.png#gh-light-mode-only) ![A screen displaying the Contact UI.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Context/Contacts~dark.png#gh-dark-mode-only)|![A screen displaying the current user account information.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Account/Account.png#gh-light-mode-only) ![A screen displaying the current user account information.](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Account/Account~dark.png#gh-dark-mode-only)|![License information to list all used Swift Packages](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Context/License.png#gh-light-mode-only) ![License information to list all used Swift Packages](TemplateApplication/Supporting%20Files/TemplateApplication.docc/Resources/Context/License~dark.png#gh-dark-mode-only)| |:--:|:--:|:--:| -|Contact Information|License Information|Mock Web Service Requests| +|Contact Information|Account Overview|License Information| > [!NOTE] > You can find all the used Spezi Modules in the [Stanford Spezi GitHub Organization](https://github.com/StanfordSpezi). diff --git a/TemplateApplication.xcodeproj/project.pbxproj b/TemplateApplication.xcodeproj/project.pbxproj index e7e3095..1311401 100644 --- a/TemplateApplication.xcodeproj/project.pbxproj +++ b/TemplateApplication.xcodeproj/project.pbxproj @@ -9,13 +9,11 @@ /* Begin PBXBuildFile section */ 27FA29902A388E9B009CAC45 /* ModalView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27FA298F2A388E9B009CAC45 /* ModalView.swift */; }; 2F1AC9DF2B4E840E00C24973 /* TemplateApplication.docc in Sources */ = {isa = PBXBuildFile; fileRef = 2F1AC9DE2B4E840E00C24973 /* TemplateApplication.docc */; }; - 2F1B52CE2A4F5CCE003AE151 /* MockUploadTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F1B52CD2A4F5CCE003AE151 /* MockUploadTests.swift */; }; 2F3D4ABC2A4E7C290068FB2F /* SpeziScheduler in Frameworks */ = {isa = PBXBuildFile; productRef = 2F3D4ABB2A4E7C290068FB2F /* SpeziScheduler */; }; 2F49B7762980407C00BCB272 /* Spezi in Frameworks */ = {isa = PBXBuildFile; productRef = 2F49B7752980407B00BCB272 /* Spezi */; }; 2F4E237E2989A2FE0013F3D9 /* OnboardingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F4E237D2989A2FE0013F3D9 /* OnboardingTests.swift */; }; 2F4E23832989D51F0013F3D9 /* TemplateApplicationTestingSetup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F4E23822989D51F0013F3D9 /* TemplateApplicationTestingSetup.swift */; }; 2F4E23872989DB360013F3D9 /* ContactsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F4E23862989DB360013F3D9 /* ContactsTests.swift */; }; - 2F4FC8D729EE69D300BFFE26 /* MockUpload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F4FC8D629EE69D300BFFE26 /* MockUpload.swift */; }; 2F5E32BD297E05EA003432F8 /* TemplateApplicationDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F5E32BC297E05EA003432F8 /* TemplateApplicationDelegate.swift */; }; 2F6025CB29BBE70F0045459E /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2F6025CA29BBE70F0045459E /* GoogleService-Info.plist */; }; 2F65B44E2A3B8B0600A36932 /* NotificationPermissions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F65B44D2A3B8B0600A36932 /* NotificationPermissions.swift */; }; @@ -37,7 +35,6 @@ 2FE5DC3A29EDD7CA004B9AB4 /* Welcome.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FE5DC3429EDD7CA004B9AB4 /* Welcome.swift */; }; 2FE5DC4029EDD7EE004B9AB4 /* FeatureFlags.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FE5DC3E29EDD7ED004B9AB4 /* FeatureFlags.swift */; }; 2FE5DC4129EDD7EE004B9AB4 /* StorageKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FE5DC3F29EDD7EE004B9AB4 /* StorageKeys.swift */; }; - 2FE5DC4729EDD7F2004B9AB4 /* CodableArray+RawRepresentable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FE5DC4429EDD7F2004B9AB4 /* CodableArray+RawRepresentable.swift */; }; 2FE5DC4E29EDD7FA004B9AB4 /* ScheduleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FE5DC4829EDD7FA004B9AB4 /* ScheduleView.swift */; }; 2FE5DC4F29EDD7FA004B9AB4 /* EventContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FE5DC4929EDD7FA004B9AB4 /* EventContext.swift */; }; 2FE5DC5029EDD7FA004B9AB4 /* EventContextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FE5DC4A29EDD7FA004B9AB4 /* EventContextView.swift */; }; @@ -57,7 +54,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 */; }; - 2FF53D8B2A8725DE00042B76 /* SpeziMockWebService in Frameworks */ = {isa = PBXBuildFile; productRef = 2FF53D8A2A8725DE00042B76 /* SpeziMockWebService */; }; 2FF53D8D2A8729D600042B76 /* TemplateApplicationStandard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FF53D8C2A8729D600042B76 /* TemplateApplicationStandard.swift */; }; 5680DD3E2AB8CD84004E6D4A /* ContributionsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5680DD3D2AB8CD84004E6D4A /* ContributionsTest.swift */; }; 56E708352BB06B7100B08F0A /* SpeziLicense in Frameworks */ = {isa = PBXBuildFile; productRef = 56E708342BB06B7100B08F0A /* SpeziLicense */; }; @@ -96,11 +92,9 @@ /* Begin PBXFileReference section */ 27FA298F2A388E9B009CAC45 /* ModalView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalView.swift; sourceTree = ""; }; 2F1AC9DE2B4E840E00C24973 /* TemplateApplication.docc */ = {isa = PBXFileReference; lastKnownFileType = folder.documentationcatalog; path = TemplateApplication.docc; sourceTree = ""; }; - 2F1B52CD2A4F5CCE003AE151 /* MockUploadTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockUploadTests.swift; sourceTree = ""; }; 2F4E237D2989A2FE0013F3D9 /* OnboardingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingTests.swift; sourceTree = ""; }; 2F4E23822989D51F0013F3D9 /* TemplateApplicationTestingSetup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateApplicationTestingSetup.swift; sourceTree = ""; }; 2F4E23862989DB360013F3D9 /* ContactsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactsTests.swift; sourceTree = ""; }; - 2F4FC8D629EE69D300BFFE26 /* MockUpload.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockUpload.swift; sourceTree = ""; }; 2F5E32BC297E05EA003432F8 /* TemplateApplicationDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateApplicationDelegate.swift; sourceTree = ""; }; 2F6025CA29BBE70F0045459E /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 2F65B44D2A3B8B0600A36932 /* NotificationPermissions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationPermissions.swift; sourceTree = ""; }; @@ -118,7 +112,6 @@ 2FE5DC3429EDD7CA004B9AB4 /* Welcome.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Welcome.swift; sourceTree = ""; }; 2FE5DC3E29EDD7ED004B9AB4 /* FeatureFlags.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeatureFlags.swift; sourceTree = ""; }; 2FE5DC3F29EDD7EE004B9AB4 /* StorageKeys.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StorageKeys.swift; sourceTree = ""; }; - 2FE5DC4429EDD7F2004B9AB4 /* CodableArray+RawRepresentable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CodableArray+RawRepresentable.swift"; sourceTree = ""; }; 2FE5DC4829EDD7FA004B9AB4 /* ScheduleView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScheduleView.swift; sourceTree = ""; }; 2FE5DC4929EDD7FA004B9AB4 /* EventContext.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventContext.swift; sourceTree = ""; }; 2FE5DC4A29EDD7FA004B9AB4 /* EventContextView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventContextView.swift; sourceTree = ""; }; @@ -164,7 +157,6 @@ 2FE5DC7529EDD8E6004B9AB4 /* SpeziFirebaseAccount in Frameworks */, A92E4DF02BAA001100AC8DE8 /* OrderedCollections in Frameworks */, 9739A0C62AD7B5730084BEA5 /* FirebaseStorage in Frameworks */, - 2FF53D8B2A8725DE00042B76 /* SpeziMockWebService in Frameworks */, 2FE5DC7229EDD8D3004B9AB4 /* SpeziHealthKit in Frameworks */, 2F49B7762980407C00BCB272 /* Spezi in Frameworks */, 2FE5DC8F29EDD980004B9AB4 /* SpeziViews in Frameworks */, @@ -194,14 +186,6 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 2F4FC8D529EE69BE00BFFE26 /* MockUpload */ = { - isa = PBXGroup; - children = ( - 2F4FC8D629EE69D300BFFE26 /* MockUpload.swift */, - ); - path = MockUpload; - sourceTree = ""; - }; 2FC9759D2978E30800BA99FE /* Supporting Files */ = { isa = PBXGroup; children = ( @@ -238,10 +222,10 @@ 2FE5DC2D29EDD792004B9AB4 /* Resources */ = { isa = PBXGroup; children = ( + 2FE5DC2A29EDD78D004B9AB4 /* AppIcon.png */, 653A255428338800005D4D48 /* Assets.xcassets */, - 2FA0BFEC2ACC977500E0EF83 /* Localizable.xcstrings */, 2FE5DC2C29EDD78E004B9AB4 /* ConsentDocument.md */, - 2FE5DC2A29EDD78D004B9AB4 /* AppIcon.png */, + 2FA0BFEC2ACC977500E0EF83 /* Localizable.xcstrings */, 2FE5DC5529EDD811004B9AB4 /* SocialSupportQuestionnaire.json */, ); path = Resources; @@ -270,14 +254,6 @@ path = SharedContext; sourceTree = ""; }; - 2FE5DC3D29EDD7E4004B9AB4 /* Helper */ = { - isa = PBXGroup; - children = ( - 2FE5DC4429EDD7F2004B9AB4 /* CodableArray+RawRepresentable.swift */, - ); - path = Helper; - sourceTree = ""; - }; 653A2544283387FE005D4D48 = { isa = PBXGroup; children = ( @@ -303,19 +279,17 @@ 653A254F283387FE005D4D48 /* TemplateApplication */ = { isa = PBXGroup; children = ( + 2FC975A72978F11A00BA99FE /* Home.swift */, 653A2550283387FE005D4D48 /* TemplateApplication.swift */, 2F5E32BC297E05EA003432F8 /* TemplateApplicationDelegate.swift */, 2FF53D8C2A8729D600042B76 /* TemplateApplicationStandard.swift */, 2F4E23822989D51F0013F3D9 /* TemplateApplicationTestingSetup.swift */, - 2FC975A72978F11A00BA99FE /* Home.swift */, A9720E412ABB68B300872D23 /* Account */, + 2FE5DC2729EDD38D004B9AB4 /* Contacts */, 2FE5DC2829EDD398004B9AB4 /* Onboarding */, + 2FE5DC2D29EDD792004B9AB4 /* Resources */, 2FE5DC3B29EDD7D0004B9AB4 /* Schedule */, - 2FE5DC2729EDD38D004B9AB4 /* Contacts */, - 2F4FC8D529EE69BE00BFFE26 /* MockUpload */, 2FE5DC3C29EDD7DA004B9AB4 /* SharedContext */, - 2FE5DC3D29EDD7E4004B9AB4 /* Helper */, - 2FE5DC2D29EDD792004B9AB4 /* Resources */, 2FC9759D2978E30800BA99FE /* Supporting Files */, ); path = TemplateApplication; @@ -335,7 +309,6 @@ 2F4E237D2989A2FE0013F3D9 /* OnboardingTests.swift */, 653A256B28338800005D4D48 /* SchedulerTests.swift */, 2F4E23862989DB360013F3D9 /* ContactsTests.swift */, - 2F1B52CD2A4F5CCE003AE151 /* MockUploadTests.swift */, 5680DD3D2AB8CD84004E6D4A /* ContributionsTest.swift */, ); path = TemplateApplicationUITests; @@ -391,7 +364,6 @@ 2FBD738B2A3BD150004228E7 /* SpeziScheduler */, 2F3D4ABB2A4E7C290068FB2F /* SpeziScheduler */, 2FE5DC8029EDD91D004B9AB4 /* SpeziOnboarding */, - 2FF53D8A2A8725DE00042B76 /* SpeziMockWebService */, 2FB099AE2A875DF100B20952 /* FirebaseAuth */, 2FB099B02A875DF100B20952 /* FirebaseFirestore */, 2FB099B22A875DF100B20952 /* FirebaseFirestoreSwift */, @@ -493,7 +465,6 @@ 2FE5DC9A29EDD9EF004B9AB4 /* XCRemoteSwiftPackageReference "XCTHealthKit" */, 2F3D4ABA2A4E7C290068FB2F /* XCRemoteSwiftPackageReference "SpeziScheduler" */, 97F466E62A76BBEE005DC9B4 /* XCRemoteSwiftPackageReference "SpeziOnboarding" */, - 2FE750CA2A87240100723EAE /* XCRemoteSwiftPackageReference "SpeziMockWebService" */, 2FB099B42A875E2B00B20952 /* XCRemoteSwiftPackageReference "HealthKitOnFHIR" */, 5661551B2AB8384200209B80 /* XCRemoteSwiftPackageReference "swift-package-list" */, A92E4DEE2BAA001100AC8DE8 /* XCRemoteSwiftPackageReference "swift-collections" */, @@ -548,7 +519,6 @@ files = ( 2FE5DC4129EDD7EE004B9AB4 /* StorageKeys.swift in Sources */, 2FE5DCB129EE6107004B9AB4 /* AccountOnboarding.swift in Sources */, - 2F4FC8D729EE69D300BFFE26 /* MockUpload.swift in Sources */, 2FE5DC3A29EDD7CA004B9AB4 /* Welcome.swift in Sources */, 2FE5DC3829EDD7CA004B9AB4 /* InterestingModules.swift in Sources */, 2FE5DC3529EDD7CA004B9AB4 /* Consent.swift in Sources */, @@ -558,7 +528,6 @@ 2FE5DC3729EDD7CA004B9AB4 /* OnboardingFlow.swift in Sources */, 2F1AC9DF2B4E840E00C24973 /* TemplateApplication.docc in Sources */, 2FF53D8D2A8729D600042B76 /* TemplateApplicationStandard.swift in Sources */, - 2FE5DC4729EDD7F2004B9AB4 /* CodableArray+RawRepresentable.swift in Sources */, A9720E432ABB68CC00872D23 /* AccountSetupHeader.swift in Sources */, 2FE5DC4029EDD7EE004B9AB4 /* FeatureFlags.swift in Sources */, 2FE5DC4F29EDD7FA004B9AB4 /* EventContext.swift in Sources */, @@ -592,7 +561,6 @@ 5680DD3E2AB8CD84004E6D4A /* ContributionsTest.swift in Sources */, 2F4E23872989DB360013F3D9 /* ContactsTests.swift in Sources */, 2F4E237E2989A2FE0013F3D9 /* OnboardingTests.swift in Sources */, - 2F1B52CE2A4F5CCE003AE151 /* MockUploadTests.swift in Sources */, 653A256C28338800005D4D48 /* SchedulerTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1098,7 +1066,7 @@ repositoryURL = "https://github.com/StanfordSpezi/SpeziScheduler.git"; requirement = { kind = upToNextMinorVersion; - minimumVersion = 0.8.0; + minimumVersion = 0.8.2; }; }; 2F49B7742980407B00BCB272 /* XCRemoteSwiftPackageReference "Spezi" */ = { @@ -1106,7 +1074,7 @@ repositoryURL = "https://github.com/StanfordSpezi/Spezi"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 1.1.0; + minimumVersion = 1.4.0; }; }; 2F66D20D2BB723180010D555 /* XCRemoteSwiftPackageReference "SwiftLint" */ = { @@ -1114,7 +1082,7 @@ repositoryURL = "https://github.com/realm/SwiftLint.git"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 0.54.0; + minimumVersion = 0.55.0; }; }; 2FB099B42A875E2B00B20952 /* XCRemoteSwiftPackageReference "HealthKitOnFHIR" */ = { @@ -1130,7 +1098,7 @@ repositoryURL = "https://github.com/StanfordSpezi/SpeziAccount.git"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 1.1.0; + minimumVersion = 1.2.0; }; }; 2FE5DC6529EDD894004B9AB4 /* XCRemoteSwiftPackageReference "SpeziContact" */ = { @@ -1162,7 +1130,7 @@ repositoryURL = "https://github.com/StanfordSpezi/SpeziQuestionnaire.git"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 1.0.0; + minimumVersion = 1.2.0; }; }; 2FE5DC8829EDD972004B9AB4 /* XCRemoteSwiftPackageReference "SpeziStorage" */ = { @@ -1178,7 +1146,7 @@ repositoryURL = "https://github.com/StanfordSpezi/SpeziViews.git"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 1.0.0; + minimumVersion = 1.5.0; }; }; 2FE5DC9029EDD9C3004B9AB4 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = { @@ -1194,7 +1162,7 @@ repositoryURL = "https://github.com/StanfordBDHG/XCTestExtensions.git"; requirement = { kind = upToNextMinorVersion; - minimumVersion = 0.4.8; + minimumVersion = 0.4.11; }; }; 2FE5DC9A29EDD9EF004B9AB4 /* XCRemoteSwiftPackageReference "XCTHealthKit" */ = { @@ -1205,14 +1173,6 @@ minimumVersion = 0.3.5; }; }; - 2FE750CA2A87240100723EAE /* XCRemoteSwiftPackageReference "SpeziMockWebService" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/StanfordSpezi/SpeziMockWebService.git"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 1.0.0; - }; - }; 5661551B2AB8384200209B80 /* XCRemoteSwiftPackageReference "swift-package-list" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/FelixHerrmann/swift-package-list"; @@ -1234,7 +1194,7 @@ repositoryURL = "https://github.com/StanfordSpezi/SpeziOnboarding"; requirement = { kind = upToNextMajorVersion; - minimumVersion = 1.0.0; + minimumVersion = 1.2.0; }; }; A92E4DEE2BAA001100AC8DE8 /* XCRemoteSwiftPackageReference "swift-collections" */ = { @@ -1352,11 +1312,6 @@ package = 2FE5DC9A29EDD9EF004B9AB4 /* XCRemoteSwiftPackageReference "XCTHealthKit" */; productName = XCTHealthKit; }; - 2FF53D8A2A8725DE00042B76 /* SpeziMockWebService */ = { - isa = XCSwiftPackageProductDependency; - package = 2FE750CA2A87240100723EAE /* XCRemoteSwiftPackageReference "SpeziMockWebService" */; - productName = SpeziMockWebService; - }; 56E708342BB06B7100B08F0A /* SpeziLicense */ = { isa = XCSwiftPackageProductDependency; package = 56E708332BB06B7100B08F0A /* XCRemoteSwiftPackageReference "SpeziLicense" */; diff --git a/TemplateApplication.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/TemplateApplication.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 1c38f28..9d4ae71 100644 --- a/TemplateApplication.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/TemplateApplication.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "d2097b02aed2e09776146d22c31b71e71570248079de679a782c846c09d0ae6f", + "originHash" : "7791f7520d86b9b987dab37c9b90dab7fe5795363615aa359655357df18d38c1", "pins" : [ { "identity" : "abseil-cpp-binary", @@ -24,8 +24,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/app-check.git", "state" : { - "revision" : "076b241a625e25eac22f8849be256dfb960fcdfe", - "version" : "10.19.1" + "revision" : "3b62f154d00019ae29a71e9738800bb6f18b236d", + "version" : "10.19.2" } }, { @@ -60,8 +60,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/firebase/firebase-ios-sdk.git", "state" : { - "revision" : "8bcaf973b1d84e119b7c7c119abad72ed460979f", - "version" : "10.27.0" + "revision" : "e57841b296d04370ea23580f908881b0ccab17b9", + "version" : "10.28.1" } }, { @@ -69,8 +69,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/GoogleAppMeasurement.git", "state" : { - "revision" : "70df02431e216bed98dd461e0c4665889245ba70", - "version" : "10.27.0" + "revision" : "fe727587518729046fc1465625b9afd80b5ab361", + "version" : "10.28.0" } }, { @@ -105,8 +105,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/gtm-session-fetcher.git", "state" : { - "revision" : "0382ca27f22fb3494cf657d8dc356dc282cd1193", - "version" : "3.4.1" + "revision" : "a2ab612cb980066ee56d90d60d8462992c07f24b", + "version" : "3.5.0" } }, { @@ -186,8 +186,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordSpezi/Spezi", "state" : { - "revision" : "734f90c19422a4196762b0e1dd055471066e89ee", - "version" : "1.3.0" + "revision" : "5ada3f3a18c86a658d140c6f4c45ca2e9d5e61ce", + "version" : "1.4.0" } }, { @@ -213,17 +213,17 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordSpezi/SpeziFirebase.git", "state" : { - "revision" : "f05c859f75d317dca9b378b7f8a7cfa8e135df04", - "version" : "1.1.1" + "revision" : "00ff0db12bf72ba39354e263d8f916ae8392368b", + "version" : "1.1.2" } }, { "identity" : "spezifoundation", "kind" : "remoteSourceControl", - "location" : "https://github.com/StanfordSpezi/SpeziFoundation", + "location" : "https://github.com/StanfordSpezi/SpeziFoundation.git", "state" : { - "revision" : "01af5b91a54f30ddd121258e81aff2ddc2a99ff9", - "version" : "1.0.4" + "revision" : "3326feab3dac120c16af63243615592990d33516", + "version" : "1.1.2" } }, { @@ -244,15 +244,6 @@ "version" : "0.1.0" } }, - { - "identity" : "spezimockwebservice", - "kind" : "remoteSourceControl", - "location" : "https://github.com/StanfordSpezi/SpeziMockWebService.git", - "state" : { - "revision" : "b18067d3499e630bbd995ef05a296ef8fdd42528", - "version" : "1.0.0" - } - }, { "identity" : "spezionboarding", "kind" : "remoteSourceControl", @@ -294,14 +285,14 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordSpezi/SpeziViews.git", "state" : { - "revision" : "4d2a724d97c8f19ac7de7aa2c046b1cb3ef7b279", - "version" : "1.3.1" + "revision" : "ff61e6594677572df051b96905cc2a7a12cffd10", + "version" : "1.5.0" } }, { "identity" : "swift-argument-parser", "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-argument-parser", + "location" : "https://github.com/apple/swift-argument-parser.git", "state" : { "revision" : "0fbc8848e389af3bb55c182bc19ca9d5dc2f255b", "version" : "1.4.0" @@ -312,8 +303,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-collections.git", "state" : { - "revision" : "94cf62b3ba8d4bed62680a282d4c25f9c63c2efb", - "version" : "1.1.0" + "revision" : "ee97538f5b81ae89698fd95938896dec5217b148", + "version" : "1.1.1" } }, { @@ -375,8 +366,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordBDHG/XCTestExtensions.git", "state" : { - "revision" : "1fe9b8e76aeb7a132af37bfa0892160c9b662dcc", - "version" : "0.4.10" + "revision" : "69eae1a4490d3ec4f3cd20584aef3df9186e0904", + "version" : "0.4.11" } }, { diff --git a/TemplateApplication.xcodeproj/xcshareddata/xcschemes/TemplateApplication.xcscheme b/TemplateApplication.xcodeproj/xcshareddata/xcschemes/TemplateApplication.xcscheme index f5e6644..e92311a 100644 --- a/TemplateApplication.xcodeproj/xcshareddata/xcschemes/TemplateApplication.xcscheme +++ b/TemplateApplication.xcodeproj/xcshareddata/xcschemes/TemplateApplication.xcscheme @@ -98,6 +98,13 @@ isEnabled = "NO"> + + + + ) { - self._presentingAccount = presentingAccount - } -} - - -#if DEBUG -#Preview { - MockUpload(presentingAccount: .constant(false)) - .previewWith { - MockWebService() - } -} -#endif diff --git a/TemplateApplication/Resources/Localizable.xcstrings b/TemplateApplication/Resources/Localizable.xcstrings index d115b28..51deb3e 100644 --- a/TemplateApplication/Resources/Localizable.xcstrings +++ b/TemplateApplication/Resources/Localizable.xcstrings @@ -276,17 +276,6 @@ } } }, - "MOCK_WEB_SERVICE_TAB_TITLE" : { - "comment" : "MARK: - Mock Upload Data Storage Provider", - "localizations" : { - "en" : { - "stringUnit" : { - "state" : "translated", - "value" : "Mock Web Service" - } - } - } - }, "NOTIFICATION_PERMISSIONS_BUTTON" : { "localizations" : { "en" : { diff --git a/TemplateApplication/Supporting Files/TemplateApplication.docc/Modify.md b/TemplateApplication/Supporting Files/TemplateApplication.docc/Modify.md index 58caef3..987480e 100644 --- a/TemplateApplication/Supporting Files/TemplateApplication.docc/Modify.md +++ b/TemplateApplication/Supporting Files/TemplateApplication.docc/Modify.md @@ -99,10 +99,5 @@ The application also gives credit to all dependencies in the Account Details. It You can investigate the [**Spezi License** module](https://github.com/StanfordSpezi/SpeziLicense) to learn how the application loads and displays the license information. } } - @Column(size: 1) { - @Image(source: "Request", alt: "User Interface of the Mock Web Service") { - If Firebase is disabled, the [**Spezi Mock Web Service** module](https://github.com/StanfordSpezi/SpeziMockWebService) allows you to see the requests that would be sent to a web service. - } - } } diff --git a/TemplateApplication/Supporting Files/TemplateApplication.docc/Resources/Context/Request.png b/TemplateApplication/Supporting Files/TemplateApplication.docc/Resources/Context/Request.png deleted file mode 100644 index e1ec526..0000000 Binary files a/TemplateApplication/Supporting Files/TemplateApplication.docc/Resources/Context/Request.png and /dev/null differ diff --git a/TemplateApplication/Supporting Files/TemplateApplication.docc/Resources/Context/Request.png.license b/TemplateApplication/Supporting Files/TemplateApplication.docc/Resources/Context/Request.png.license deleted file mode 100644 index 8ffe29f..0000000 --- a/TemplateApplication/Supporting Files/TemplateApplication.docc/Resources/Context/Request.png.license +++ /dev/null @@ -1,6 +0,0 @@ - -This source file is part of the Stanford Spezi Template Application open-source project - -SPDX-FileCopyrightText: 2023 Stanford University - -SPDX-License-Identifier: MIT diff --git a/TemplateApplication/Supporting Files/TemplateApplication.docc/Resources/Context/Request~dark.png b/TemplateApplication/Supporting Files/TemplateApplication.docc/Resources/Context/Request~dark.png deleted file mode 100644 index d11e5b0..0000000 Binary files a/TemplateApplication/Supporting Files/TemplateApplication.docc/Resources/Context/Request~dark.png and /dev/null differ diff --git a/TemplateApplication/Supporting Files/TemplateApplication.docc/Resources/Context/Request~dark.png.license b/TemplateApplication/Supporting Files/TemplateApplication.docc/Resources/Context/Request~dark.png.license deleted file mode 100644 index 8ffe29f..0000000 --- a/TemplateApplication/Supporting Files/TemplateApplication.docc/Resources/Context/Request~dark.png.license +++ /dev/null @@ -1,6 +0,0 @@ - -This source file is part of the Stanford Spezi Template Application open-source project - -SPDX-FileCopyrightText: 2023 Stanford University - -SPDX-License-Identifier: MIT diff --git a/TemplateApplication/Supporting Files/TemplateApplication.docc/TemplateApplication.md b/TemplateApplication/Supporting Files/TemplateApplication.docc/TemplateApplication.md index 99ffbad..39ec08e 100644 --- a/TemplateApplication/Supporting Files/TemplateApplication.docc/TemplateApplication.md +++ b/TemplateApplication/Supporting Files/TemplateApplication.docc/TemplateApplication.md @@ -49,15 +49,15 @@ The following screenshots show a wide variety of features based on Spezi Modules } } @Column(size: 1) { - @Image(source: "Schedule", alt: "A screen displaying the Scheduler UI.") { - Schedule Tasks. + @Image(source: "Notifications", alt: "Onboarding screen showing the Notifications permission screen.") { + Trigger Local Notifications. } } } @Row(numberOfColumns: 3) { @Column(size: 1) { - @Image(source: "Notifications", alt: "Onboarding screen showing the Notifications permission screen.") { - Trigger Local Notifications. + @Image(source: "Schedule", alt: "A screen displaying the Scheduler UI.") { + Schedule Tasks. } } @Column(size: 1) { @@ -78,13 +78,13 @@ The following screenshots show a wide variety of features based on Spezi Modules } } @Column(size: 1) { - @Image(source: "License", alt: "License information to list all used Swift Packages") { - License Information. + @Image(source: "Account", alt: "A screen displaying the current user account information.") { + Account Overview. } } @Column(size: 1) { - @Image(source: "Request", alt: "User Interface of the Mock Web Service") { - Mock Web Service Requests. + @Image(source: "License", alt: "License information to list all used Swift Packages") { + License Information. } } } diff --git a/TemplateApplication/TemplateApplicationDelegate.swift b/TemplateApplication/TemplateApplicationDelegate.swift index 628c3e5..06c4053 100644 --- a/TemplateApplication/TemplateApplicationDelegate.swift +++ b/TemplateApplication/TemplateApplicationDelegate.swift @@ -12,7 +12,6 @@ import SpeziFirebaseAccount import SpeziFirebaseStorage import SpeziFirestore import SpeziHealthKit -import SpeziMockWebService import SpeziOnboarding import SpeziScheduler import SwiftUI @@ -45,8 +44,6 @@ class TemplateApplicationDelegate: SpeziAppDelegate { } else { FirebaseStorageConfiguration() } - } else { - MockWebService() } if HKHealthStore.isHealthDataAvailable() { diff --git a/TemplateApplication/TemplateApplicationStandard.swift b/TemplateApplication/TemplateApplicationStandard.swift index e835043..a28cc47 100644 --- a/TemplateApplication/TemplateApplicationStandard.swift +++ b/TemplateApplication/TemplateApplicationStandard.swift @@ -16,7 +16,6 @@ import SpeziAccount import SpeziFirebaseAccountStorage import SpeziFirestore import SpeziHealthKit -import SpeziMockWebService import SpeziOnboarding import SpeziQuestionnaire import SwiftUI @@ -36,12 +35,10 @@ actor TemplateApplicationStandard: Standard, Firestore.firestore().collection("users") } - @Dependency var mockWebService: MockWebService? @Dependency var accountStorage: FirestoreAccountStorage? @AccountReference var account: Account - - private let logger = Logger(subsystem: "TemplateApplication", category: "Standard") + @Application(\.logger) private var logger private var userDocumentReference: DocumentReference { @@ -73,11 +70,8 @@ actor TemplateApplicationStandard: Standard, func add(sample: HKSample) async { - if let mockWebService { - let encoder = JSONEncoder() - encoder.outputFormatting = [.prettyPrinted, .sortedKeys, .withoutEscapingSlashes] - let jsonRepresentation = (try? String(data: encoder.encode(sample.resource), encoding: .utf8)) ?? "" - try? await mockWebService.upload(path: "healthkit/\(sample.uuid.uuidString)", body: jsonRepresentation) + if FeatureFlags.disableFirebase { + logger.debug("Received new HealthKit sample: \(sample)") return } @@ -89,8 +83,8 @@ actor TemplateApplicationStandard: Standard, } func remove(sample: HKDeletedObject) async { - if let mockWebService { - try? await mockWebService.remove(path: "healthkit/\(sample.uuid.uuidString)") + if FeatureFlags.disableFirebase { + logger.debug("Received new removed healthkit sample with id \(sample.uuid)") return } @@ -104,9 +98,9 @@ actor TemplateApplicationStandard: Standard, func add(response: ModelsR4.QuestionnaireResponse) async { let id = response.identifier?.value?.value?.string ?? UUID().uuidString - if let mockWebService { + if FeatureFlags.disableFirebase { let jsonRepresentation = (try? String(data: JSONEncoder().encode(response), encoding: .utf8)) ?? "" - try? await mockWebService.upload(path: "questionnaireResponse/\(id)", body: jsonRepresentation) + logger.debug("Received questionnaire response: \(jsonRepresentation)") return } diff --git a/TemplateApplicationUITests/MockUploadTests.swift b/TemplateApplicationUITests/MockUploadTests.swift deleted file mode 100644 index 298caa0..0000000 --- a/TemplateApplicationUITests/MockUploadTests.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// This source file is part of the Stanford Spezi Template Application open-source project -// -// SPDX-FileCopyrightText: 2023 Stanford University -// -// SPDX-License-Identifier: MIT -// - -import XCTest - - -class MockUploadTestsTests: XCTestCase { - override func setUpWithError() throws { - try super.setUpWithError() - - continueAfterFailure = false - - let app = XCUIApplication() - app.launchArguments = ["--skipOnboarding", "--disableFirebase"] - app.launch() - } - - - func testMockUpload() throws { - let app = XCUIApplication() - - XCTAssertTrue(app.tabBars["Tab Bar"].buttons["Mock Web Service"].waitForExistence(timeout: 2)) - app.tabBars["Tab Bar"].buttons["Mock Web Service"].tap() - - XCTAssertTrue(app.staticTexts["Mock Requests"].waitForExistence(timeout: 2)) - } -} diff --git a/fastlane/Fastfile b/fastlane/Fastfile index ab3f7d6..bb38b7f 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -10,7 +10,7 @@ default_platform(:ios) platform :ios do before_all do - ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "5" + ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "10" ENV["FASTLANE_XCODEBUILD_SETTINGS_RETRIES"] = "6" end @@ -35,6 +35,7 @@ platform :ios do desc "CodeQL" lane :codeql do + ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "320" # CodeQL runs on GitHub CI. We need much higher timeout here. build_app( skip_archive: true, skip_codesigning: true,