diff --git a/Balance.xcodeproj/project.pbxproj b/Balance.xcodeproj/project.pbxproj index 6e26b7f..0772e5f 100644 --- a/Balance.xcodeproj/project.pbxproj +++ b/Balance.xcodeproj/project.pbxproj @@ -21,21 +21,12 @@ 2761584B29A6548B006C7AC1 /* SpotifyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2761584A29A6548B006C7AC1 /* SpotifyView.swift */; }; 2761584D29A654FD006C7AC1 /* Music.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2761584C29A654FD006C7AC1 /* Music.swift */; }; 276222BD29B0E3E100FCB4C5 /* NoteStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 276222BC29B0E3E100FCB4C5 /* NoteStore.swift */; }; - 2F49B7762980407C00BCB272 /* CardinalKit in Frameworks */ = {isa = PBXBuildFile; productRef = 2F49B7752980407B00BCB272 /* CardinalKit */; }; - 2F49B7782980407C00BCB272 /* FHIR in Frameworks */ = {isa = PBXBuildFile; productRef = 2F49B7772980407C00BCB272 /* FHIR */; }; - 2F49B77A2980407C00BCB272 /* HealthKitDataSource in Frameworks */ = {isa = PBXBuildFile; productRef = 2F49B7792980407C00BCB272 /* HealthKitDataSource */; }; - 2F49B77C2980407C00BCB272 /* HealthKitToFHIRAdapter in Frameworks */ = {isa = PBXBuildFile; productRef = 2F49B77B2980407C00BCB272 /* HealthKitToFHIRAdapter */; }; - 2F49B77E2980407C00BCB272 /* Scheduler in Frameworks */ = {isa = PBXBuildFile; productRef = 2F49B77D2980407C00BCB272 /* Scheduler */; }; - 2F49B7802980418400BCB272 /* Onboarding in Frameworks */ = {isa = PBXBuildFile; productRef = 2F49B77F2980418400BCB272 /* Onboarding */; }; - 2F49B7822980419C00BCB272 /* Questionnaires in Frameworks */ = {isa = PBXBuildFile; productRef = 2F49B7812980419C00BCB272 /* Questionnaires */; }; - 2F49B784298041F300BCB272 /* Contact in Frameworks */ = {isa = PBXBuildFile; productRef = 2F49B783298041F300BCB272 /* Contact */; }; + 2F431C4F2C1391E20079E5D5 /* FirebaseAuth in Frameworks */ = {isa = PBXBuildFile; productRef = 2F431C4E2C1391E20079E5D5 /* FirebaseAuth */; }; 2F4E23832989D51F0013F3D9 /* BalanceAppTestingSetup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F4E23822989D51F0013F3D9 /* BalanceAppTestingSetup.swift */; }; 2F5E32BD297E05EA003432F8 /* BalanceAppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F5E32BC297E05EA003432F8 /* BalanceAppDelegate.swift */; }; 2F9056EA299E2D8A003D3802 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2F9056E9299E2D8A003D3802 /* GoogleService-Info.plist */; }; - 2F9056EF299E3180003D3802 /* FirebaseAccount in Frameworks */ = {isa = PBXBuildFile; productRef = 2F9056EE299E3180003D3802 /* FirebaseAccount */; }; - 2F9056F1299E3181003D3802 /* FirestoreDataStorage in Frameworks */ = {isa = PBXBuildFile; productRef = 2F9056F0299E3181003D3802 /* FirestoreDataStorage */; }; - 2F9056F3299E3181003D3802 /* FirestoreStoragePrefixUserIdAdapter in Frameworks */ = {isa = PBXBuildFile; productRef = 2F9056F2299E3181003D3802 /* FirestoreStoragePrefixUserIdAdapter */; }; - 2F9056F5299E3205003D3802 /* FHIRToFirestoreAdapter in Frameworks */ = {isa = PBXBuildFile; productRef = 2F9056F4299E3205003D3802 /* FHIRToFirestoreAdapter */; }; + 2FA3A88A2C1393F5008DF2CE /* SpeziOnboarding in Frameworks */ = {isa = PBXBuildFile; productRef = 2FA3A8892C1393F5008DF2CE /* SpeziOnboarding */; }; + 2FA3A88D2C13982E008DF2CE /* SpeziFirestore in Frameworks */ = {isa = PBXBuildFile; productRef = 2FA3A88C2C13982E008DF2CE /* SpeziFirestore */; }; 2FC9759F2978E39600BA99FE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2FC9759E2978E39600BA99FE /* Localizable.strings */; }; 2FC975A82978F11A00BA99FE /* Home.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FC975A72978F11A00BA99FE /* Home.swift */; }; 2FE3025C2AC510AB00763567 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2FE3025B2AC510AB00763567 /* Assets.xcassets */; }; @@ -45,7 +36,6 @@ 4A45C88D29B4151B006A52A1 /* SleepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A45C88C29B4151B006A52A1 /* SleepView.swift */; }; 4ACC786229AC0BEC0048D1D1 /* Youtube.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ACC786129AC0BEC0048D1D1 /* Youtube.swift */; }; 4ACC786429AC0C070048D1D1 /* MeditationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ACC786329AC0C070048D1D1 /* MeditationView.swift */; }; - 5AAFCE1A29A75990006CCD66 /* LocalStorage in Frameworks */ = {isa = PBXBuildFile; productRef = 5AAFCE1929A75990006CCD66 /* LocalStorage */; }; 5E03E9A129BC15CF0041DD1C /* ActivityLogBaseView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E03E9A029BC15CF0041DD1C /* ActivityLogBaseView.swift */; }; 5E03E9A329BC933B0041DD1C /* ActivityLogButtonStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E03E9A229BC933B0041DD1C /* ActivityLogButtonStyle.swift */; }; 5EF9D78429B5AFF1006C3B22 /* ActivityStorageManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5EF9D78329B5AFF1006C3B22 /* ActivityStorageManager.swift */; }; @@ -97,14 +87,10 @@ 6C55241D29F86C2700F802D9 /* ConsentDocument.md.license in Resources */ = {isa = PBXBuildFile; fileRef = 6C55241B29F86C2700F802D9 /* ConsentDocument.md.license */; }; 6C55241E29F86C2700F802D9 /* ConsentDocument.md in Resources */ = {isa = PBXBuildFile; fileRef = 6C55241C29F86C2700F802D9 /* ConsentDocument.md */; }; 6C55242629F86D9200F802D9 /* BalanceAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C55242129F86D9200F802D9 /* BalanceAccount.swift */; }; - 6C55242829F86D9200F802D9 /* UserView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C55242329F86D9200F802D9 /* UserView.swift */; }; - 6C55242E29F86DD800F802D9 /* Consent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C55242929F86DD800F802D9 /* Consent.swift */; }; 6C55242F29F86DD800F802D9 /* String+ModuleLocalized.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C55242A29F86DD800F802D9 /* String+ModuleLocalized.swift */; }; 6C55243029F86DD800F802D9 /* InterestingModules.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C55242B29F86DD800F802D9 /* InterestingModules.swift */; }; 6C55243129F86DD800F802D9 /* OnboardingFlow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C55242C29F86DD800F802D9 /* OnboardingFlow.swift */; }; - 6C55243229F86DD800F802D9 /* HealthKitPermissions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C55242D29F86DD800F802D9 /* HealthKitPermissions.swift */; }; 6C55243729F8722B00F802D9 /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C55243329F8722900F802D9 /* MainView.swift */; }; - 6C55243829F8722B00F802D9 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C55243429F8722A00F802D9 /* ContentView.swift */; }; 6C55243929F8722B00F802D9 /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C55243529F8722A00F802D9 /* LoginView.swift */; }; 6C55243A29F8722B00F802D9 /* AuthViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C55243629F8722A00F802D9 /* AuthViewModel.swift */; }; 6C55770F2A3A505F003FD6EE /* SpotifyDataController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C55770E2A3A505F003FD6EE /* SpotifyDataController.swift */; }; @@ -320,14 +306,10 @@ 6C55241B29F86C2700F802D9 /* ConsentDocument.md.license */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ConsentDocument.md.license; sourceTree = ""; }; 6C55241C29F86C2700F802D9 /* ConsentDocument.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = ConsentDocument.md; sourceTree = ""; }; 6C55242129F86D9200F802D9 /* BalanceAccount.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BalanceAccount.swift; sourceTree = ""; }; - 6C55242329F86D9200F802D9 /* UserView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserView.swift; sourceTree = ""; }; - 6C55242929F86DD800F802D9 /* Consent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Consent.swift; sourceTree = ""; }; 6C55242A29F86DD800F802D9 /* String+ModuleLocalized.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+ModuleLocalized.swift"; sourceTree = ""; }; 6C55242B29F86DD800F802D9 /* InterestingModules.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InterestingModules.swift; sourceTree = ""; }; 6C55242C29F86DD800F802D9 /* OnboardingFlow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OnboardingFlow.swift; sourceTree = ""; }; - 6C55242D29F86DD800F802D9 /* HealthKitPermissions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HealthKitPermissions.swift; sourceTree = ""; }; 6C55243329F8722900F802D9 /* MainView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = ""; }; - 6C55243429F8722A00F802D9 /* ContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 6C55243529F8722A00F802D9 /* LoginView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginView.swift; sourceTree = ""; }; 6C55243629F8722A00F802D9 /* AuthViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthViewModel.swift; sourceTree = ""; }; 6C55770E2A3A505F003FD6EE /* SpotifyDataController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpotifyDataController.swift; sourceTree = ""; }; @@ -441,22 +423,12 @@ buildActionMask = 2147483647; files = ( 89EB7BAD29B45381000470FC /* FirebaseFirestore in Frameworks */, - 2F49B7822980419C00BCB272 /* Questionnaires in Frameworks */, - 2F49B77E2980407C00BCB272 /* Scheduler in Frameworks */, - 2F9056F1299E3181003D3802 /* FirestoreDataStorage in Frameworks */, - 2F49B77A2980407C00BCB272 /* HealthKitDataSource in Frameworks */, - 5AAFCE1A29A75990006CCD66 /* LocalStorage in Frameworks */, + 2F431C4F2C1391E20079E5D5 /* FirebaseAuth in Frameworks */, + 2FA3A88D2C13982E008DF2CE /* SpeziFirestore in Frameworks */, 6CAA076329E8983A00541F87 /* YouTubePlayerKit in Frameworks */, - 2F9056F3299E3181003D3802 /* FirestoreStoragePrefixUserIdAdapter in Frameworks */, - 2F49B784298041F300BCB272 /* Contact in Frameworks */, + 2FA3A88A2C1393F5008DF2CE /* SpeziOnboarding in Frameworks */, 5EF9D78629B5CC58006C3B22 /* FirebaseStorage in Frameworks */, - 2F49B7782980407C00BCB272 /* FHIR in Frameworks */, - 2F49B7802980418400BCB272 /* Onboarding in Frameworks */, - 2F49B7762980407C00BCB272 /* CardinalKit in Frameworks */, - 2F49B77C2980407C00BCB272 /* HealthKitToFHIRAdapter in Frameworks */, - 2F9056F5299E3205003D3802 /* FHIRToFirestoreAdapter in Frameworks */, 2761584929A6512E006C7AC1 /* SpotifyiOS in Frameworks */, - 2F9056EF299E3180003D3802 /* FirebaseAccount in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -705,18 +677,14 @@ isa = PBXGroup; children = ( 6C55243629F8722A00F802D9 /* AuthViewModel.swift */, - 6C55243429F8722A00F802D9 /* ContentView.swift */, 6C55243329F8722900F802D9 /* MainView.swift */, 6C55243529F8722A00F802D9 /* LoginView.swift */, 6C8868AC2A3A011A00000647 /* LoginViewLocal.swift */, 6C47338A29FAB89900DC72D0 /* SignUpView.swift */, - 6C55242929F86DD800F802D9 /* Consent.swift */, - 6C55242D29F86DD800F802D9 /* HealthKitPermissions.swift */, 6C55242B29F86DD800F802D9 /* InterestingModules.swift */, 6C55242C29F86DD800F802D9 /* OnboardingFlow.swift */, 6C55242A29F86DD800F802D9 /* String+ModuleLocalized.swift */, 6C55242129F86D9200F802D9 /* BalanceAccount.swift */, - 6C55242329F86D9200F802D9 /* UserView.swift */, 6C47338C29FB09E400DC72D0 /* ProfileUser.swift */, 6CE62D562A028F3400BB4F90 /* Country.swift */, ); @@ -996,23 +964,13 @@ ); name = Balance; packageProductDependencies = ( - 2F49B7752980407B00BCB272 /* CardinalKit */, - 2F49B7772980407C00BCB272 /* FHIR */, - 2F49B7792980407C00BCB272 /* HealthKitDataSource */, - 2F49B77B2980407C00BCB272 /* HealthKitToFHIRAdapter */, - 2F49B77D2980407C00BCB272 /* Scheduler */, - 2F49B77F2980418400BCB272 /* Onboarding */, - 2F49B7812980419C00BCB272 /* Questionnaires */, - 2F49B783298041F300BCB272 /* Contact */, - 2F9056EE299E3180003D3802 /* FirebaseAccount */, - 2F9056F0299E3181003D3802 /* FirestoreDataStorage */, - 2F9056F2299E3181003D3802 /* FirestoreStoragePrefixUserIdAdapter */, - 2F9056F4299E3205003D3802 /* FHIRToFirestoreAdapter */, - 5AAFCE1929A75990006CCD66 /* LocalStorage */, 2F39333629A8A5690035A05C /* FirebaseFirestore */, 2761584829A6512E006C7AC1 /* SpotifyiOS */, 5EF9D78529B5CC58006C3B22 /* FirebaseStorage */, 6CAA076229E8983A00541F87 /* YouTubePlayerKit */, + 2F431C4E2C1391E20079E5D5 /* FirebaseAuth */, + 2FA3A8892C1393F5008DF2CE /* SpeziOnboarding */, + 2FA3A88C2C13982E008DF2CE /* SpeziFirestore */, ); productName = TemplateApplication; productReference = 653A254D283387FE005D4D48 /* Balance.app */; @@ -1069,12 +1027,13 @@ ); mainGroup = 653A2544283387FE005D4D48; packageReferences = ( - 2F49B7742980407B00BCB272 /* XCRemoteSwiftPackageReference "CardinalKit" */, 2F9056F6299E3267003D3802 /* XCRemoteSwiftPackageReference "XCTHealthKit" */, 2F9056F9299E329C003D3802 /* XCRemoteSwiftPackageReference "XCTestExtensions" */, 2F39333529A8A5690035A05C /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, 2761584729A6512E006C7AC1 /* XCRemoteSwiftPackageReference "ios-sdk" */, 6CAA076129E8983A00541F87 /* XCRemoteSwiftPackageReference "YouTubePlayerKit" */, + 2FA3A8882C1393F5008DF2CE /* XCRemoteSwiftPackageReference "SpeziOnboarding" */, + 2FA3A88B2C13982E008DF2CE /* XCRemoteSwiftPackageReference "SpeziFirebase" */, ); productRefGroup = 653A254E283387FE005D4D48 /* Products */; projectDirPath = ""; @@ -1246,7 +1205,6 @@ 6CB5181E29E6F395007AADB4 /* ImageView.swift in Sources */, 6C92E3C22A17C84E003FE239 /* RoundedCorner.swift in Sources */, 896C65D629B92EF800F30BA2 /* Config.swift in Sources */, - 6C55243229F86DD800F802D9 /* HealthKitPermissions.swift in Sources */, 6CB5181129E1B13E007AADB4 /* GamesView.swift in Sources */, 2F5E32BD297E05EA003432F8 /* BalanceAppDelegate.swift in Sources */, 6CA4EFE629EDEBB000877850 /* AccesoryView.swift in Sources */, @@ -1274,9 +1232,7 @@ 6CF510C029C8FD25008A2F55 /* LocationView.swift in Sources */, 6CF6BEE72A31103A00A337F3 /* FeatureFlags.swift in Sources */, 2761584D29A654FD006C7AC1 /* Music.swift in Sources */, - 6C55242829F86D9200F802D9 /* UserView.swift in Sources */, 6C0A4BF029E9B0CD003007C7 /* AvatarView.swift in Sources */, - 6C55242E29F86DD800F802D9 /* Consent.swift in Sources */, 6C32484C2A8D85CE00223F8C /* ButtonView.swift in Sources */, 6C3BB1F52A1646C5008FEB93 /* PasswordResetView.swift in Sources */, 6CB5180D29DF5800007AADB4 /* GamesWebView.swift in Sources */, @@ -1298,7 +1254,6 @@ 6CB5181A29E45678007AADB4 /* ImageCollectionView.swift in Sources */, 6C3248482A8D85AB00223F8C /* SketchView.swift in Sources */, 6CE8A7892AA291A4003CD727 /* ChillCellView.swift in Sources */, - 6C55243829F8722B00F802D9 /* ContentView.swift in Sources */, 6CC177262A3A5E2900121B72 /* ActivityLogStore.swift in Sources */, 89EB7BB129B45D2B000470FC /* HeaderMenu.swift in Sources */, 6CC177282A3A6BA900121B72 /* CellView.swift in Sources */, @@ -1385,7 +1340,6 @@ SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 9.0; }; name = Debug; }; @@ -1429,7 +1383,6 @@ SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 9.0; }; name = Release; }; @@ -1484,13 +1437,14 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + WATCHOS_DEPLOYMENT_TARGET = 10.0; }; name = Debug; }; @@ -1539,13 +1493,14 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; + IPHONEOS_DEPLOYMENT_TARGET = 17.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; VALIDATE_PRODUCT = YES; + WATCHOS_DEPLOYMENT_TARGET = 10.0; }; name = Release; }; @@ -1593,7 +1548,6 @@ INFOPLIST_KEY_UITemplateApplicationlicationSceneManifest_Generation = YES; INFOPLIST_KEY_UITemplateApplicationlicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UIUserInterfaceStyle = Light; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1657,7 +1611,6 @@ INFOPLIST_KEY_UITemplateApplicationlicationSceneManifest_Generation = YES; INFOPLIST_KEY_UITemplateApplicationlicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UIUserInterfaceStyle = Light; - IPHONEOS_DEPLOYMENT_TARGET = 16.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1688,7 +1641,6 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 637867499T; GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = edu.stanford.cs342.2023.balance.tests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1710,7 +1662,6 @@ CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 637867499T; GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 16.2; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = edu.stanford.cs342.2023.balance.tests; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1781,14 +1732,6 @@ minimumVersion = 10.5.0; }; }; - 2F49B7742980407B00BCB272 /* XCRemoteSwiftPackageReference "CardinalKit" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/StanfordBDHG/CardinalKit"; - requirement = { - kind = upToNextMinorVersion; - minimumVersion = 0.3.1; - }; - }; 2F9056F6299E3267003D3802 /* XCRemoteSwiftPackageReference "XCTHealthKit" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/StanfordBDHG/XCTHealthKit"; @@ -1802,7 +1745,23 @@ repositoryURL = "https://github.com/StanfordBDHG/XCTestExtensions"; requirement = { kind = upToNextMinorVersion; - minimumVersion = 0.3.0; + minimumVersion = 0.4.10; + }; + }; + 2FA3A8882C1393F5008DF2CE /* XCRemoteSwiftPackageReference "SpeziOnboarding" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/StanfordSpezi/SpeziOnboarding.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 1.2.0; + }; + }; + 2FA3A88B2C13982E008DF2CE /* XCRemoteSwiftPackageReference "SpeziFirebase" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/StanfordSpezi/SpeziFirebase.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 1.1.1; }; }; 6CAA076129E8983A00541F87 /* XCRemoteSwiftPackageReference "YouTubePlayerKit" */ = { @@ -1826,70 +1785,20 @@ package = 2F39333529A8A5690035A05C /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; productName = FirebaseFirestore; }; - 2F49B7752980407B00BCB272 /* CardinalKit */ = { - isa = XCSwiftPackageProductDependency; - package = 2F49B7742980407B00BCB272 /* XCRemoteSwiftPackageReference "CardinalKit" */; - productName = CardinalKit; - }; - 2F49B7772980407C00BCB272 /* FHIR */ = { + 2F431C4E2C1391E20079E5D5 /* FirebaseAuth */ = { isa = XCSwiftPackageProductDependency; - package = 2F49B7742980407B00BCB272 /* XCRemoteSwiftPackageReference "CardinalKit" */; - productName = FHIR; - }; - 2F49B7792980407C00BCB272 /* HealthKitDataSource */ = { - isa = XCSwiftPackageProductDependency; - package = 2F49B7742980407B00BCB272 /* XCRemoteSwiftPackageReference "CardinalKit" */; - productName = HealthKitDataSource; - }; - 2F49B77B2980407C00BCB272 /* HealthKitToFHIRAdapter */ = { - isa = XCSwiftPackageProductDependency; - package = 2F49B7742980407B00BCB272 /* XCRemoteSwiftPackageReference "CardinalKit" */; - productName = HealthKitToFHIRAdapter; - }; - 2F49B77D2980407C00BCB272 /* Scheduler */ = { - isa = XCSwiftPackageProductDependency; - package = 2F49B7742980407B00BCB272 /* XCRemoteSwiftPackageReference "CardinalKit" */; - productName = Scheduler; - }; - 2F49B77F2980418400BCB272 /* Onboarding */ = { - isa = XCSwiftPackageProductDependency; - package = 2F49B7742980407B00BCB272 /* XCRemoteSwiftPackageReference "CardinalKit" */; - productName = Onboarding; - }; - 2F49B7812980419C00BCB272 /* Questionnaires */ = { - isa = XCSwiftPackageProductDependency; - package = 2F49B7742980407B00BCB272 /* XCRemoteSwiftPackageReference "CardinalKit" */; - productName = Questionnaires; - }; - 2F49B783298041F300BCB272 /* Contact */ = { - isa = XCSwiftPackageProductDependency; - package = 2F49B7742980407B00BCB272 /* XCRemoteSwiftPackageReference "CardinalKit" */; - productName = Contact; - }; - 2F9056EE299E3180003D3802 /* FirebaseAccount */ = { - isa = XCSwiftPackageProductDependency; - package = 2F49B7742980407B00BCB272 /* XCRemoteSwiftPackageReference "CardinalKit" */; - productName = FirebaseAccount; - }; - 2F9056F0299E3181003D3802 /* FirestoreDataStorage */ = { - isa = XCSwiftPackageProductDependency; - package = 2F49B7742980407B00BCB272 /* XCRemoteSwiftPackageReference "CardinalKit" */; - productName = FirestoreDataStorage; - }; - 2F9056F2299E3181003D3802 /* FirestoreStoragePrefixUserIdAdapter */ = { - isa = XCSwiftPackageProductDependency; - package = 2F49B7742980407B00BCB272 /* XCRemoteSwiftPackageReference "CardinalKit" */; - productName = FirestoreStoragePrefixUserIdAdapter; + package = 2F39333529A8A5690035A05C /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */; + productName = FirebaseAuth; }; - 2F9056F4299E3205003D3802 /* FHIRToFirestoreAdapter */ = { + 2FA3A8892C1393F5008DF2CE /* SpeziOnboarding */ = { isa = XCSwiftPackageProductDependency; - package = 2F49B7742980407B00BCB272 /* XCRemoteSwiftPackageReference "CardinalKit" */; - productName = FHIRToFirestoreAdapter; + package = 2FA3A8882C1393F5008DF2CE /* XCRemoteSwiftPackageReference "SpeziOnboarding" */; + productName = SpeziOnboarding; }; - 5AAFCE1929A75990006CCD66 /* LocalStorage */ = { + 2FA3A88C2C13982E008DF2CE /* SpeziFirestore */ = { isa = XCSwiftPackageProductDependency; - package = 2F49B7742980407B00BCB272 /* XCRemoteSwiftPackageReference "CardinalKit" */; - productName = LocalStorage; + package = 2FA3A88B2C13982E008DF2CE /* XCRemoteSwiftPackageReference "SpeziFirebase" */; + productName = SpeziFirestore; }; 5EF9D78529B5CC58006C3B22 /* FirebaseStorage */ = { isa = XCSwiftPackageProductDependency; diff --git a/Balance.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Balance.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 68d31ab..7d908ad 100644 --- a/Balance.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Balance.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,30 +1,22 @@ { + "originHash" : "9a2ec0153ac68a34b7437f77b1581088266f22c19125dfe889c09bd915b8fdc2", "pins" : [ { "identity" : "abseil-cpp-binary", "kind" : "remoteSourceControl", "location" : "https://github.com/google/abseil-cpp-binary.git", "state" : { - "revision" : "bfc0b6f81adc06ce5121eb23f628473638d67c5c", - "version" : "1.2022062300.0" + "revision" : "748c7837511d0e6a507737353af268484e1745e2", + "version" : "1.2024011601.1" } }, { - "identity" : "cardinalkit", + "identity" : "app-check", "kind" : "remoteSourceControl", - "location" : "https://github.com/StanfordBDHG/CardinalKit", + "location" : "https://github.com/google/app-check.git", "state" : { - "revision" : "6162a67a0b821c2be9358bec798d5d3e94cc5783", - "version" : "0.3.5" - } - }, - { - "identity" : "fhirmodels", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/FHIRModels", - "state" : { - "revision" : "e115442fb3c5d44ffb1dc9b4e039b77fd143ad96", - "version" : "0.4.0" + "revision" : "076b241a625e25eac22f8849be256dfb960fcdfe", + "version" : "10.19.1" } }, { @@ -32,8 +24,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/firebase/firebase-ios-sdk.git", "state" : { - "revision" : "8a8ec57a272e0d31480fb0893dda0cf4f769b57e", - "version" : "10.15.0" + "revision" : "8bcaf973b1d84e119b7c7c119abad72ed460979f", + "version" : "10.27.0" } }, { @@ -41,8 +33,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/GoogleAppMeasurement.git", "state" : { - "revision" : "03b9beee1a61f62d32c521e172e192a1663a5e8b", - "version" : "10.13.0" + "revision" : "70df02431e216bed98dd461e0c4665889245ba70", + "version" : "10.27.0" } }, { @@ -50,8 +42,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/GoogleDataTransport.git", "state" : { - "revision" : "aae45a320fd0d11811820335b1eabc8753902a40", - "version" : "9.2.5" + "revision" : "a637d318ae7ae246b02d7305121275bc75ed5565", + "version" : "9.4.0" } }, { @@ -59,8 +51,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/GoogleUtilities.git", "state" : { - "revision" : "c38ce365d77b04a9a300c31061c5227589e5597b", - "version" : "7.11.5" + "revision" : "57a1d307f42df690fdef2637f3e5b776da02aad6", + "version" : "7.13.3" } }, { @@ -68,8 +60,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/grpc-binary.git", "state" : { - "revision" : "f1b366129d1125be7db83247e003fc333104b569", - "version" : "1.50.2" + "revision" : "e9fad491d0673bdda7063a0341fb6b47a30c5359", + "version" : "1.62.2" } }, { @@ -77,17 +69,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/gtm-session-fetcher.git", "state" : { - "revision" : "d415594121c9e8a4f9d79cecee0965cf35e74dbd", - "version" : "3.1.1" - } - }, - { - "identity" : "healthkitonfhir", - "kind" : "remoteSourceControl", - "location" : "https://github.com/StanfordBDHG/HealthKitOnFHIR", - "state" : { - "revision" : "fdf8e4543718a940643598e4bd5e750e9c4c5540", - "version" : "0.2.4" + "revision" : "0382ca27f22fb3494cf657d8dc356dc282cd1193", + "version" : "3.4.1" } }, { @@ -105,7 +88,7 @@ "location" : "https://github.com/spotify/ios-sdk.git", "state" : { "branch" : "master", - "revision" : "cdbdcb341ace5defa863cf323749376f7e4888e9" + "revision" : "55fd4a65b1b7fb483b583e6032168e1dc85ed178" } }, { @@ -113,8 +96,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/firebase/leveldb.git", "state" : { - "revision" : "0706abcc6b0bd9cedfbb015ba840e4a780b5159b", - "version" : "1.22.2" + "revision" : "a0bc79961d7be727d258d33d5a6b2f1023270ba1", + "version" : "1.22.5" } }, { @@ -122,8 +105,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/firebase/nanopb.git", "state" : { - "revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692", - "version" : "2.30909.0" + "revision" : "b7e1104502eca3a213b46303391ca4d3bc8ddec1", + "version" : "2.30910.0" } }, { @@ -131,26 +114,80 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/google/promises.git", "state" : { - "revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e", - "version" : "2.3.1" + "revision" : "540318ecedd63d883069ae7f1ed811a2df00b6ac", + "version" : "2.4.0" + } + }, + { + "identity" : "spezi", + "kind" : "remoteSourceControl", + "location" : "https://github.com/StanfordSpezi/Spezi", + "state" : { + "revision" : "734f90c19422a4196762b0e1dd055471066e89ee", + "version" : "1.3.0" + } + }, + { + "identity" : "speziaccount", + "kind" : "remoteSourceControl", + "location" : "https://github.com/StanfordSpezi/SpeziAccount", + "state" : { + "revision" : "2de07209430fe7b13c44790eab948b30482fcb9d", + "version" : "1.2.4" + } + }, + { + "identity" : "spezifirebase", + "kind" : "remoteSourceControl", + "location" : "https://github.com/StanfordSpezi/SpeziFirebase.git", + "state" : { + "revision" : "f05c859f75d317dca9b378b7f8a7cfa8e135df04", + "version" : "1.1.1" + } + }, + { + "identity" : "spezifoundation", + "kind" : "remoteSourceControl", + "location" : "https://github.com/StanfordSpezi/SpeziFoundation", + "state" : { + "revision" : "01af5b91a54f30ddd121258e81aff2ddc2a99ff9", + "version" : "1.0.4" } }, { - "identity" : "researchkit", + "identity" : "spezionboarding", "kind" : "remoteSourceControl", - "location" : "https://github.com/StanfordBDHG/ResearchKit", + "location" : "https://github.com/StanfordSpezi/SpeziOnboarding.git", "state" : { - "revision" : "9530fadc9d09c0b783388c752b0dbe841974b6af", - "version" : "2.2.18" + "revision" : "8d6dda3501720a1952573439b21a503cbecd9e0f", + "version" : "1.2.0" } }, { - "identity" : "researchkitonfhir", + "identity" : "spezistorage", "kind" : "remoteSourceControl", - "location" : "https://github.com/StanfordBDHG/ResearchKitOnFHIR", + "location" : "https://github.com/StanfordSpezi/SpeziStorage", "state" : { - "revision" : "1bc7a15760916ade4c5058fa798a871e80c2955c", - "version" : "0.1.6" + "revision" : "b958df9b31f24800388a7bfc28f457ce7b82556c", + "version" : "1.0.2" + } + }, + { + "identity" : "speziviews", + "kind" : "remoteSourceControl", + "location" : "https://github.com/StanfordSpezi/SpeziViews", + "state" : { + "revision" : "4d2a724d97c8f19ac7de7aa2c046b1cb3ef7b279", + "version" : "1.3.1" + } + }, + { + "identity" : "swift-collections", + "kind" : "remoteSourceControl", + "location" : "https://github.com/apple/swift-collections.git", + "state" : { + "revision" : "94cf62b3ba8d4bed62680a282d4c25f9c63c2efb", + "version" : "1.1.0" } }, { @@ -158,8 +195,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-protobuf.git", "state" : { - "revision" : "3c54ab05249f59f2c6641dd2920b8358ea9ed127", - "version" : "1.24.0" + "revision" : "9f0c76544701845ad98716f3f6a774a892152bcb", + "version" : "1.26.0" } }, { @@ -167,8 +204,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/StanfordBDHG/XCTestExtensions", "state" : { - "revision" : "a96a1680557507a9746bbb0529043b9767c503db", - "version" : "0.3.0" + "revision" : "1fe9b8e76aeb7a132af37bfa0892160c9b662dcc", + "version" : "0.4.10" } }, { @@ -180,15 +217,24 @@ "version" : "0.3.5" } }, + { + "identity" : "xctruntimeassertions", + "kind" : "remoteSourceControl", + "location" : "https://github.com/StanfordBDHG/XCTRuntimeAssertions", + "state" : { + "revision" : "51da3403f128b120705571ce61e0fe190f8889e6", + "version" : "1.0.1" + } + }, { "identity" : "youtubeplayerkit", "kind" : "remoteSourceControl", "location" : "https://github.com/SvenTiigi/YouTubePlayerKit.git", "state" : { - "revision" : "6bbba75c8a8927e8073765849e22707d96b55205", - "version" : "1.5.2" + "revision" : "5ade0dfbabaf7456069b4e8f604de261bf6d7c67", + "version" : "1.8.0" } } ], - "version" : 2 + "version" : 3 } diff --git a/Balance/Balance.swift b/Balance/Balance.swift index 3f474b4..f4e097e 100644 --- a/Balance/Balance.swift +++ b/Balance/Balance.swift @@ -6,7 +6,6 @@ // SPDX-License-Identifier: MIT // -import CardinalKit import SwiftUI // swiftlint:disable closure_body_length @@ -43,7 +42,6 @@ struct Balance: App { } } .testingSetup() - .cardinalKit(appDelegate) .environmentObject(noteStore) .environmentObject(drawStore) .environmentObject(coloringStore) diff --git a/Balance/BalanceAppDelegate.swift b/Balance/BalanceAppDelegate.swift index 2aec63a..bfbd37f 100644 --- a/Balance/BalanceAppDelegate.swift +++ b/Balance/BalanceAppDelegate.swift @@ -6,75 +6,43 @@ // SPDX-License-Identifier: MIT // -import CardinalKit -import FHIR -import FHIRToFirestoreAdapter -import FirebaseAccount -import class FirebaseFirestore.FirestoreSettings -import FirestoreDataStorage -import FirestoreStoragePrefixUserIdAdapter -import HealthKit -import HealthKitDataSource -import HealthKitToFHIRAdapter -import Questionnaires -import Scheduler +import Spezi +import SpeziFirestore import SwiftUI -class BalanceAppDelegate: CardinalKitAppDelegate { +class BalanceAppDelegate: SpeziAppDelegate { override var configuration: Configuration { - Configuration(standard: FHIR()) { -#if !DEMO + Configuration { + #if !DEMO if !FeatureFlags.disableFirebase { - if FeatureFlags.useFirebaseEmulator { - FirebaseAccountConfiguration(emulatorSettings: (host: "localhost", port: 9099)) - } else { - FirebaseAccountConfiguration() - } firestore } - if HKHealthStore.isHealthDataAvailable() { - healthKit - } -#endif + #endif } } -#if !DEMO - private var firestore: Firestore { + + #if !DEMO + private var firestore: Firestore { let settings = FirestoreSettings() if FeatureFlags.useFirebaseEmulator { settings.host = "localhost:8080" - settings.isPersistenceEnabled = false + settings.cacheSettings = MemoryCacheSettings() settings.isSSLEnabled = false } return Firestore( - adapter: { - FHIRToFirestoreAdapter() - FirestoreStoragePrefixUserIdAdapter() - }, settings: settings ) } -#endif + #endif - private var healthKit: HealthKit { - HealthKit { - CollectSample( - HKQuantityType(.stepCount), - deliverySetting: .anchorQuery(.afterAuthorizationAndApplicationWillLaunch) - ) - } adapter: { - HealthKitToFHIRAdapter() - } - } - - - func application( + override func application( _ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions ) -> UISceneConfiguration { + _ = super.application(application, configurationForConnecting: connectingSceneSession, options: options) let sceneConfig = UISceneConfiguration(name: nil, sessionRole: connectingSceneSession.role) sceneConfig.delegateClass = SceneDelegate.self return sceneConfig diff --git a/Balance/Diary/Views/DiaryNoteEntryView.swift b/Balance/Diary/Views/DiaryNoteEntryView.swift index 8bb08a5..a39746c 100644 --- a/Balance/Diary/Views/DiaryNoteEntryView.swift +++ b/Balance/Diary/Views/DiaryNoteEntryView.swift @@ -6,7 +6,6 @@ // SPDX-License-Identifier: MIT // -import CardinalKit import SwiftUI struct DiaryNoteEntryView: View { diff --git a/Balance/Distraction/Gallery/LookVideos/VideoCollectionView.swift b/Balance/Distraction/Gallery/LookVideos/VideoCollectionView.swift index 931098c..c8c1b0c 100644 --- a/Balance/Distraction/Gallery/LookVideos/VideoCollectionView.swift +++ b/Balance/Distraction/Gallery/LookVideos/VideoCollectionView.swift @@ -17,7 +17,6 @@ struct YoutubeModalView: View { let youTubePlayer = YouTubePlayer( source: .video(id: videoID), configuration: .init( - fullscreenMode: .system, autoPlay: true, showControls: true ) diff --git a/Balance/Distraction/Music/iOS_SDK/SpotifyViewController.swift b/Balance/Distraction/Music/iOS_SDK/SpotifyViewController.swift index 971e402..052b663 100644 --- a/Balance/Distraction/Music/iOS_SDK/SpotifyViewController.swift +++ b/Balance/Distraction/Music/iOS_SDK/SpotifyViewController.swift @@ -217,7 +217,7 @@ class SpotifyViewController: UIViewController { guard let sessionManager = sessionManager else { return } - sessionManager.initiateSession(with: SpotifyConfig.scopes, options: .clientOnly) + sessionManager.initiateSession(with: SpotifyConfig.scopes, options: .clientOnly, campaign: nil) } @objc @@ -454,7 +454,7 @@ extension SpotifyViewController: UITableViewDelegate, UITableViewDataSource { guard let sessionManager = sessionManager else { return } - sessionManager.initiateSession(with: SpotifyConfig.scopes, options: .clientOnly) + sessionManager.initiateSession(with: SpotifyConfig.scopes, options: .clientOnly, campaign: nil) } } diff --git a/Balance/Home/Home.swift b/Balance/Home/Home.swift index f1d55cf..d2ca068 100644 --- a/Balance/Home/Home.swift +++ b/Balance/Home/Home.swift @@ -6,10 +6,7 @@ // SPDX-License-Identifier: MIT // -import Account import SwiftUI -import class FHIR.FHIR -import FirebaseAccount import WatchConnectivity struct HomeView: View { diff --git a/Balance/Login/BalanceAccount.swift b/Balance/Login/BalanceAccount.swift index 63a86bc..c9e9238 100644 --- a/Balance/Login/BalanceAccount.swift +++ b/Balance/Login/BalanceAccount.swift @@ -6,7 +6,6 @@ // SPDX-License-Identifier: MIT // -import Onboarding import SwiftUI struct BalanceAccount: View { diff --git a/Balance/Login/Consent.swift b/Balance/Login/Consent.swift deleted file mode 100644 index 22487a4..0000000 --- a/Balance/Login/Consent.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// This source file is part of the CS342 2023 Balance Team Application project -// -// SPDX-FileCopyrightText: 2023 Stanford University -// -// SPDX-License-Identifier: MIT -// - -import Onboarding -import SwiftUI - - -struct Consent: View { - @Binding private var onboardingSteps: [OnboardingFlow.Step] - - - private var consentDocument: Data { - guard let path = Bundle.main.url(forResource: "ConsentDocument", withExtension: "md"), - let data = try? Data(contentsOf: path) else { - return Data("CONSENT_LOADING_ERROR".moduleLocalized.utf8) - } - return data - } - - var body: some View { - ConsentView( - header: { - OnboardingTitleView( - title: "CONSENT_TITLE".moduleLocalized, - subtitle: "CONSENT_SUBTITLE".moduleLocalized - ) - }, - asyncMarkdown: { - consentDocument - }, - action: { - if !FeatureFlags.disableFirebase { - onboardingSteps.append(.login) - } else { - onboardingSteps.append(.login) - } - } - ) - } - - - init(onboardingSteps: Binding<[OnboardingFlow.Step]>) { - self._onboardingSteps = onboardingSteps - } -} - - -struct Consent_Previews: PreviewProvider { - @State private static var path: [OnboardingFlow.Step] = [] - - - static var previews: some View { - Consent(onboardingSteps: $path) - } -} diff --git a/Balance/Login/ContentView.swift b/Balance/Login/ContentView.swift deleted file mode 100644 index 97bcb19..0000000 --- a/Balance/Login/ContentView.swift +++ /dev/null @@ -1,30 +0,0 @@ -// -// ContentView.swift -// Balance -// -// Created by Gonzalo Perisset on 28/04/2023. -// - -import SwiftUI - -struct ContentView: View { - @EnvironmentObject private var authModel: AuthViewModel - - var body: some View { - Group { - if authModel.user != nil { - MainView() - } else { - // LoginView() - } - }.onAppear { - authModel.listenAuthentificationState() - } - } -} - -struct ContentView_Previews: PreviewProvider { - static var previews: some View { - ContentView() - } -} diff --git a/Balance/Login/HealthKitPermissions.swift b/Balance/Login/HealthKitPermissions.swift deleted file mode 100644 index 481a842..0000000 --- a/Balance/Login/HealthKitPermissions.swift +++ /dev/null @@ -1,61 +0,0 @@ -// -// This source file is part of the CS342 2023 Balance Team Application project -// -// SPDX-FileCopyrightText: 2023 Stanford University -// -// SPDX-License-Identifier: MIT -// - -import FHIR -import HealthKitDataSource -import Onboarding -import SwiftUI - - -struct HealthKitPermissions: View { - @EnvironmentObject var healthKitDataSource: HealthKit - @AppStorage(StorageKeys.onboardingFlowComplete) - var completedOnboardingFlow = false - - - var body: some View { - OnboardingView( - contentView: { - VStack { - OnboardingTitleView( - title: "HEALTHKIT_PERMISSIONS_TITLE".moduleLocalized, - subtitle: "HEALTHKIT_PERMISSIONS_SUBTITLE".moduleLocalized - ) - Spacer() - Image(systemName: "heart.text.square.fill") - .font(.system(size: 150)) - .foregroundColor(.accentColor) - .accessibility(hidden: true) - Text("HEALTHKIT_PERMISSIONS_DESCRIPTION") - .multilineTextAlignment(.center) - .padding(.vertical, 16) - Spacer() - } - }, actionView: { - OnboardingActionsView( - "HEALTHKIT_PERMISSIONS_BUTTON".moduleLocalized, - action: { - do { - try await healthKitDataSource.askForAuthorization() - } catch { - print("Could not request HealthKit permissions.") - } - completedOnboardingFlow = true - } - ) - } - ) - } -} - - -struct HealthKitPermissions_Previews: PreviewProvider { - static var previews: some View { - HealthKitPermissions() - } -} diff --git a/Balance/Login/InterestingModules.swift b/Balance/Login/InterestingModules.swift index 6deea5f..b18cc02 100644 --- a/Balance/Login/InterestingModules.swift +++ b/Balance/Login/InterestingModules.swift @@ -6,7 +6,7 @@ // SPDX-License-Identifier: MIT // -import Onboarding +import SpeziOnboarding import SwiftUI diff --git a/Balance/Login/LoginView.swift b/Balance/Login/LoginView.swift index d84426c..f619235 100644 --- a/Balance/Login/LoginView.swift +++ b/Balance/Login/LoginView.swift @@ -6,7 +6,6 @@ // import Combine -import Onboarding import SwiftUI struct LoginView: View { diff --git a/Balance/Login/LoginViewLocal.swift b/Balance/Login/LoginViewLocal.swift index a0cfb8c..7588f48 100644 --- a/Balance/Login/LoginViewLocal.swift +++ b/Balance/Login/LoginViewLocal.swift @@ -6,7 +6,6 @@ // import Combine -import Onboarding import SwiftUI // swiftlint:disable line_length diff --git a/Balance/Login/SignUpView.swift b/Balance/Login/SignUpView.swift index f53dcac..32b08b0 100644 --- a/Balance/Login/SignUpView.swift +++ b/Balance/Login/SignUpView.swift @@ -5,7 +5,6 @@ // Created by Gonzalo Perisset on 27/04/2023. // -import Onboarding import SwiftUI // swiftlint: disable type_body_length diff --git a/Balance/Login/UserView.swift b/Balance/Login/UserView.swift deleted file mode 100644 index 8225566..0000000 --- a/Balance/Login/UserView.swift +++ /dev/null @@ -1,69 +0,0 @@ -// -// This source file is part of the Stanford CardinalKit Balance Application project -// -// SPDX-FileCopyrightText: 2023 Stanford University -// -// SPDX-License-Identifier: MIT -// - -import Account -import class FHIR.FHIR -import FirebaseAccount -import Foundation -import SwiftUI -import Views - - -struct UserView: View { - @EnvironmentObject var account: Account - @EnvironmentObject var firebaseAccountConfiguration: FirebaseAccountConfiguration - - var body: some View { - userInformation - .padding() - .background( - RoundedRectangle(cornerRadius: 8) - .fill(Color(.systemBackground)) - .shadow(color: .gray, radius: 2) - ) - } - - - @ViewBuilder var userInformation: some View { - HStack(spacing: 16) { - if account.signedIn, - let user = firebaseAccountConfiguration.user, - let displayName = user.displayName, - let name = try? PersonNameComponents(displayName) { - UserProfileView(name: name) - .frame(height: 30) - VStack(alignment: .leading, spacing: 4) { - Text(name.formatted(.name(style: .medium))) - if let email = user.email { - Text(email) - } - } - Spacer() - } else { - Spacer() - VStack(spacing: 16) { - ProgressView() - Text("USER_VIEW_LOADING", bundle: .main) - .multilineTextAlignment(.center) - } - Spacer() - } - } - } -} - - -#if DEBUG -struct SwiftUIView_Previews: PreviewProvider { - static var previews: some View { - UserView() - .padding() - .environmentObject(FirebaseAccountConfiguration(emulatorSettings: (host: "localhost", port: 9099))) - } -} -#endif diff --git a/Balance/Profile/AvatarPreviewView.swift b/Balance/Profile/AvatarPreviewView.swift index 3828970..25bc2cc 100644 --- a/Balance/Profile/AvatarPreviewView.swift +++ b/Balance/Profile/AvatarPreviewView.swift @@ -5,7 +5,6 @@ // Created by Gonzalo Perisset on 14/04/2023. // -import Onboarding import SwiftUI // swiftlint:disable type_body_length diff --git a/Balance/Profile/UserProfileRepositoryLocal.swift b/Balance/Profile/UserProfileRepositoryLocal.swift index fa6bfe8..fffa214 100644 --- a/Balance/Profile/UserProfileRepositoryLocal.swift +++ b/Balance/Profile/UserProfileRepositoryLocal.swift @@ -5,12 +5,10 @@ // Created by Gonzalo Perisset on 28/04/2023. // -import FHIR import FirebaseAuth import FirebaseCore import FirebaseFirestore import Foundation -import LocalStorage import SwiftUI class UserProfileRepositoryToLocal: ObservableObject {