From 74a5ca29c47f8f0a5c10c8d9ae852b4db18235c4 Mon Sep 17 00:00:00 2001 From: Mikaela Caron Date: Sun, 12 Nov 2023 01:04:13 -0500 Subject: [PATCH] Firebase Analytics (#262) --- .../project.pbxproj | 4 ++ .../xcschemes/Basic-Car-Maintenance.xcscheme | 6 +++ .../ViewModels/DashboardViewModel.swift | 7 ++++ .../ViewModels/OdometerViewModel.swift | 4 ++ .../ViewModels/AuthenticationViewModel.swift | 1 + .../ViewModels/SettingsViewModel.swift | 4 ++ .../Shared/Utilities/AnalyticsService.swift | 41 +++++++++++++++++++ 7 files changed, 67 insertions(+) create mode 100644 Basic-Car-Maintenance/Shared/Utilities/AnalyticsService.swift diff --git a/Basic-Car-Maintenance.xcodeproj/project.pbxproj b/Basic-Car-Maintenance.xcodeproj/project.pbxproj index f3a57b92..2bcd6003 100644 --- a/Basic-Car-Maintenance.xcodeproj/project.pbxproj +++ b/Basic-Car-Maintenance.xcodeproj/project.pbxproj @@ -27,6 +27,7 @@ E58499682ACDDA9A00634660 /* ContributorsProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E58499672ACDDA9A00634660 /* ContributorsProfileView.swift */; }; E584996A2ACDDAFF00634660 /* Contributor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E58499692ACDDAFF00634660 /* Contributor.swift */; }; FF09FC912AB6FF44006BE61A /* AuthenticationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF09FC902AB6FF44006BE61A /* AuthenticationView.swift */; }; + FF218EF62B00865F0025A533 /* AnalyticsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF218EF52B00865F0025A533 /* AnalyticsService.swift */; }; FF3DDF522AA4D28F009D91C4 /* DashboardViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF3DDF512AA4D28F009D91C4 /* DashboardViewModel.swift */; }; FF4E82BE2AD39863004949AF /* FirebaseRemoteConfig in Frameworks */ = {isa = PBXBuildFile; productRef = FF4E82BD2AD39863004949AF /* FirebaseRemoteConfig */; }; FF4E82C02AD39863004949AF /* FirebaseRemoteConfigSwift in Frameworks */ = {isa = PBXBuildFile; productRef = FF4E82BF2AD39863004949AF /* FirebaseRemoteConfigSwift */; }; @@ -126,6 +127,7 @@ FF0813572AD0A92700910EFA /* Widget.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Widget.xcconfig; sourceTree = ""; }; FF098EFA2AB3424E003EC0FE /* Basic-Car-Maintenance.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Basic-Car-Maintenance.xcconfig"; sourceTree = SOURCE_ROOT; }; FF09FC902AB6FF44006BE61A /* AuthenticationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationView.swift; sourceTree = ""; }; + FF218EF52B00865F0025A533 /* AnalyticsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnalyticsService.swift; sourceTree = ""; }; FF3DDF512AA4D28F009D91C4 /* DashboardViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DashboardViewModel.swift; sourceTree = ""; }; FF5D13A32A86C2D600BC9BD6 /* Basic-Car-Maintenance.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Basic-Car-Maintenance.app"; sourceTree = BUILT_PRODUCTS_DIR; }; FF5D13A62A86C2D600BC9BD6 /* BasicCarMaintenanceApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BasicCarMaintenanceApp.swift; sourceTree = ""; }; @@ -392,6 +394,7 @@ FF755B452A90969D00F49A13 /* Bundle+extension.swift */, 154984A92AD9CAEE0015594C /* Constants.swift */, 637505472AEFFBAC00AA5D0B /* FirebaseAnalytics+Extension.swift */, + FF218EF52B00865F0025A533 /* AnalyticsService.swift */, ); path = Utilities; sourceTree = ""; @@ -713,6 +716,7 @@ FFBFE0932A98F212000A9BEB /* Vehicle.swift in Sources */, FF5D13A72A86C2D600BC9BD6 /* BasicCarMaintenanceApp.swift in Sources */, 8014A4D12AD76034005B51F6 /* ChooseAppIconView.swift in Sources */, + FF218EF62B00865F0025A533 /* AnalyticsService.swift in Sources */, FF748B5E2AB3589C004748A5 /* AuthenticationViewModel.swift in Sources */, FF755B462A90969D00F49A13 /* Bundle+extension.swift in Sources */, FFAA56ED2AC8905C000120EE /* Documentation.docc in Sources */, diff --git a/Basic-Car-Maintenance.xcodeproj/xcshareddata/xcschemes/Basic-Car-Maintenance.xcscheme b/Basic-Car-Maintenance.xcodeproj/xcshareddata/xcschemes/Basic-Car-Maintenance.xcscheme index 4161357f..dd1ab8c9 100644 --- a/Basic-Car-Maintenance.xcodeproj/xcshareddata/xcschemes/Basic-Car-Maintenance.xcscheme +++ b/Basic-Car-Maintenance.xcodeproj/xcshareddata/xcschemes/Basic-Car-Maintenance.xcscheme @@ -73,6 +73,12 @@ ReferencedContainer = "container:Basic-Car-Maintenance.xcodeproj"> + + + +