diff --git a/Client.xcodeproj/project.pbxproj b/Client.xcodeproj/project.pbxproj index 75bd9d4fa2d15..923928bcadfb4 100644 --- a/Client.xcodeproj/project.pbxproj +++ b/Client.xcodeproj/project.pbxproj @@ -29,7 +29,6 @@ 0BF1B7E31AC60DEA00A7B407 /* InsetButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BF1B7E21AC60DEA00A7B407 /* InsetButton.swift */; }; 12147F2F2CDA3CD00009D300 /* NTPNewsletterCardCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12147F2E2CDA3CD00009D300 /* NTPNewsletterCardCell.swift */; }; 12147F312CDA3CD80009D300 /* NTPNewsletterCardViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12147F302CDA3CD80009D300 /* NTPNewsletterCardViewModel.swift */; }; - 12147F332CDBA7230009D300 /* NewsletterCardExperiment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12147F322CDBA7230009D300 /* NewsletterCardExperiment.swift */; }; 122935742CE78D0A00EC1297 /* Ecosia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1229356A2CE78D0A00EC1297 /* Ecosia.framework */; }; 1229357C2CE78D0A00EC1297 /* Ecosia.h in Headers */ = {isa = PBXBuildFile; fileRef = 1229356C2CE78D0A00EC1297 /* Ecosia.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1229357F2CE78D0A00EC1297 /* Ecosia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1229356A2CE78D0A00EC1297 /* Ecosia.framework */; }; @@ -39,10 +38,26 @@ 122935912CE78ED500EC1297 /* BrazeKit in Frameworks */ = {isa = PBXBuildFile; productRef = 122935902CE78ED500EC1297 /* BrazeKit */; }; 122935932CE78ED500EC1297 /* BrazeUI in Frameworks */ = {isa = PBXBuildFile; productRef = 122935922CE78ED500EC1297 /* BrazeUI */; }; 1229359C2CE7927900EC1297 /* BrazeService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1229359B2CE7927800EC1297 /* BrazeService.swift */; }; + 1229359E2CE79A2600EC1297 /* Analytics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C61892E2B7A8A22006B70D7 /* Analytics.swift */; }; + 1229359F2CE79A2800EC1297 /* Analytics+Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C61892F2B7A8A22006B70D7 /* Analytics+Configuration.swift */; }; + 122935A02CE79A3100EC1297 /* Analytics.Values.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189302B7A8A22006B70D7 /* Analytics.Values.swift */; }; + 122935A22CE79A9400EC1297 /* EcosiaInstallType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189282B7A8A22006B70D7 /* EcosiaInstallType.swift */; }; + 122935A42CE79A9A00EC1297 /* EcosiaInstallType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189292B7A8A22006B70D7 /* EcosiaInstallType+Extensions.swift */; }; + 122935A52CE79AF400EC1297 /* DefaultAppVersionInfoProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189252B7A8A22006B70D7 /* DefaultAppVersionInfoProvider.swift */; }; + 122935A62CE79AF800EC1297 /* AppVersionInfoProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189262B7A8A22006B70D7 /* AppVersionInfoProvider.swift */; }; + 122935A72CE79B0400EC1297 /* Version.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C61892B2B7A8A22006B70D7 /* Version.swift */; }; + 122935A82CE79B0800EC1297 /* Version+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C61892C2B7A8A22006B70D7 /* Version+Extensions.swift */; }; + 122935A92CE79CC800EC1297 /* Shared.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288A2D861AB8B3260023ABC3 /* Shared.framework */; }; + 122935AB2CE79D6F00EC1297 /* AppInfo+Ecosia.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189092B7A8A22006B70D7 /* AppInfo+Ecosia.swift */; }; + 122935AC2CE79DA200EC1297 /* BrazeIntegrationExperiment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6188F82B7A8A22006B70D7 /* BrazeIntegrationExperiment.swift */; }; + 122935AE2CE79DA900EC1297 /* APNConsentOnLaunchExperiment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1285E2B62CC68BF00053506B /* APNConsentOnLaunchExperiment.swift */; }; + 122935AF2CE79DAD00EC1297 /* OnboardingRemoveExperiment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CFE600B2CD3AAB6001F35D2 /* OnboardingRemoveExperiment.swift */; }; + 122935B02CE79DB100EC1297 /* NewsletterCardExperiment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12147F322CDBA7230009D300 /* NewsletterCardExperiment.swift */; }; + 122935B32CE79E2400EC1297 /* SeedCounterNTPExperiment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6B5B402CAAF3AA00F15323 /* SeedCounterNTPExperiment.swift */; }; + 122935B52CE79EF900EC1297 /* SnowplowTracker in Frameworks */ = {isa = PBXBuildFile; productRef = 122935B42CE79EF900EC1297 /* SnowplowTracker */; }; 126509852CD925B40011BA36 /* BrazeKit in Frameworks */ = {isa = PBXBuildFile; productRef = 126509842CD925B40011BA36 /* BrazeKit */; }; 126509872CD925B40011BA36 /* BrazeUI in Frameworks */ = {isa = PBXBuildFile; productRef = 126509862CD925B40011BA36 /* BrazeUI */; }; 1285E2B52CC293CA0053506B /* AnalyticsSpyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1285E2B42CC293CA0053506B /* AnalyticsSpyTests.swift */; }; - 1285E2B72CC68BF00053506B /* APNConsentOnLaunchExperiment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1285E2B62CC68BF00053506B /* APNConsentOnLaunchExperiment.swift */; }; 158241282820698B00956B39 /* RustRemoteTabsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 158241272820698B00956B39 /* RustRemoteTabsTests.swift */; }; 15DE98FD27FCED4F00F1ECDB /* RustRemoteTabs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15DE98FC27FCED4F00F1ECDB /* RustRemoteTabs.swift */; }; 1B3D99F1270E89D0006E1264 /* Telemetry in Frameworks */ = {isa = PBXBuildFile; productRef = 1B3D99F0270E89D0006E1264 /* Telemetry */; }; @@ -300,7 +315,6 @@ 2C61897E2B7A8A22006B70D7 /* FeatureManagement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6188EE2B7A8A22006B70D7 /* FeatureManagement.swift */; }; 2C61897F2B7A8A22006B70D7 /* EcosiaHomepageSectionType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6188F12B7A8A22006B70D7 /* EcosiaHomepageSectionType.swift */; }; 2C6189802B7A8A22006B70D7 /* EcosiaTopSiteItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6188F42B7A8A22006B70D7 /* EcosiaTopSiteItemCell.swift */; }; - 2C6189822B7A8A22006B70D7 /* BrazeIntegrationExperiment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6188F82B7A8A22006B70D7 /* BrazeIntegrationExperiment.swift */; }; 2C6189842B7A8A22006B70D7 /* WebsiteConnectionStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6188FB2B7A8A22006B70D7 /* WebsiteConnectionStatus.swift */; }; 2C6189862B7A8A22006B70D7 /* BrowserViewController+Ecosia.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189002B7A8A22006B70D7 /* BrowserViewController+Ecosia.swift */; }; 2C6189872B7A8A22006B70D7 /* LegacyThemeManager+Ecosia.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189012B7A8A22006B70D7 /* LegacyThemeManager+Ecosia.swift */; }; @@ -311,7 +325,6 @@ 2C61898C2B7A8A22006B70D7 /* HomepageViewController+Ecosia.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189062B7A8A22006B70D7 /* HomepageViewController+Ecosia.swift */; }; 2C61898D2B7A8A22006B70D7 /* SimpleToast+Ecosia.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189072B7A8A22006B70D7 /* SimpleToast+Ecosia.swift */; }; 2C61898E2B7A8A22006B70D7 /* UIView+maskedCorners.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189082B7A8A22006B70D7 /* UIView+maskedCorners.swift */; }; - 2C61898F2B7A8A22006B70D7 /* AppInfo+Ecosia.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189092B7A8A22006B70D7 /* AppInfo+Ecosia.swift */; }; 2C6189902B7A8A22006B70D7 /* NumberFormatter+Ecosia.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C61890A2B7A8A22006B70D7 /* NumberFormatter+Ecosia.swift */; }; 2C6189912B7A8A22006B70D7 /* URL+Ecosia.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C61890B2B7A8A22006B70D7 /* URL+Ecosia.swift */; }; 2C6189922B7A8A22006B70D7 /* BrowserCoordinator+Ecosia.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C61890C2B7A8A22006B70D7 /* BrowserCoordinator+Ecosia.swift */; }; @@ -321,15 +334,6 @@ 2C6189972B7A8A22006B70D7 /* ConnectionStatusImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189122B7A8A22006B70D7 /* ConnectionStatusImage.swift */; }; 2C6189982B7A8A22006B70D7 /* BookmarksExchange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189172B7A8A22006B70D7 /* BookmarksExchange.swift */; }; 2C6189992B7A8A22006B70D7 /* markets.json in Resources */ = {isa = PBXBuildFile; fileRef = 2C6189182B7A8A22006B70D7 /* markets.json */; }; - 2C6189A22B7A8A22006B70D7 /* DefaultAppVersionInfoProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189252B7A8A22006B70D7 /* DefaultAppVersionInfoProvider.swift */; }; - 2C6189A32B7A8A22006B70D7 /* AppVersionInfoProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189262B7A8A22006B70D7 /* AppVersionInfoProvider.swift */; }; - 2C6189A42B7A8A22006B70D7 /* EcosiaInstallType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189282B7A8A22006B70D7 /* EcosiaInstallType.swift */; }; - 2C6189A52B7A8A22006B70D7 /* EcosiaInstallType+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189292B7A8A22006B70D7 /* EcosiaInstallType+Extensions.swift */; }; - 2C6189A62B7A8A22006B70D7 /* Version.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C61892B2B7A8A22006B70D7 /* Version.swift */; }; - 2C6189A72B7A8A22006B70D7 /* Version+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C61892C2B7A8A22006B70D7 /* Version+Extensions.swift */; }; - 2C6189A82B7A8A22006B70D7 /* Analytics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C61892E2B7A8A22006B70D7 /* Analytics.swift */; }; - 2C6189A92B7A8A22006B70D7 /* Analytics+Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C61892F2B7A8A22006B70D7 /* Analytics+Configuration.swift */; }; - 2C6189AA2B7A8A22006B70D7 /* Analytics.Values.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189302B7A8A22006B70D7 /* Analytics.Values.swift */; }; 2C6189D12B7A8D3E006B70D7 /* EcosiaThemeManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6188C32B7A8A22006B70D7 /* EcosiaThemeManager.swift */; }; 2C6189D22B7A8D69006B70D7 /* EcosiaThemeColourPalette.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6188C42B7A8A22006B70D7 /* EcosiaThemeColourPalette.swift */; }; 2C6189DD2B7B7776006B70D7 /* AppInfo+Ecosia.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6189092B7A8A22006B70D7 /* AppInfo+Ecosia.swift */; }; @@ -364,7 +368,6 @@ 2C69DA942C63B0C000D7F69F /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C69DA932C63B0C000D7F69F /* String+Extension.swift */; }; 2C6B5B3E2CAAF28000F15323 /* NTPSeedCounterCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6B5B3A2CAAF27F00F15323 /* NTPSeedCounterCell.swift */; }; 2C6B5B3F2CAAF28000F15323 /* NTPSeedCounterViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6B5B3B2CAAF27F00F15323 /* NTPSeedCounterViewModel.swift */; }; - 2C6B5B412CAAF3AA00F15323 /* SeedCounterNTPExperiment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6B5B402CAAF3AA00F15323 /* SeedCounterNTPExperiment.swift */; }; 2C6C908F2C614A6C007D9B43 /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = 2C6C908E2C614A6C007D9B43 /* SnapshotTesting */; }; 2C6C90902C614A76007D9B43 /* OnboardingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD368492C5BC31700972871 /* OnboardingTests.swift */; }; 2C728D7E2CBBDCDC00C7684B /* UnleashUserDefaultsSeedProgressManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C728D7D2CBBDCDC00C7684B /* UnleashUserDefaultsSeedProgressManagerTests.swift */; }; @@ -397,7 +400,6 @@ 2CE294492B7CDD78006C22B2 /* Core in Frameworks */ = {isa = PBXBuildFile; productRef = 2CE294482B7CDD78006C22B2 /* Core */; }; 2CE2E24D2B9B1FCB00973C16 /* Core in Frameworks */ = {isa = PBXBuildFile; productRef = 2CE2E24C2B9B1FCB00973C16 /* Core */; }; 2CF4DA632BB31970001C340A /* Core in Frameworks */ = {isa = PBXBuildFile; productRef = 2CF4DA622BB31970001C340A /* Core */; }; - 2CFE600C2CD3AAB6001F35D2 /* OnboardingRemoveExperiment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CFE600B2CD3AAB6001F35D2 /* OnboardingRemoveExperiment.swift */; }; 2F13E79B1AC0C02700D75081 /* StringExtensionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F13E79A1AC0C02700D75081 /* StringExtensionsTests.swift */; }; 2F44FA1B1A9D426A00FD20CC /* TestHashExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F44FA1A1A9D426A00FD20CC /* TestHashExtensions.swift */; }; 2F44FB2C1A9D5D8500FD20CC /* Library.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F84B22261A09127C00AAB793 /* Library.xcassets */; }; @@ -7787,6 +7789,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 122935A92CE79CC800EC1297 /* Shared.framework in Frameworks */, + 122935B52CE79EF900EC1297 /* SnowplowTracker in Frameworks */, 122935932CE78ED500EC1297 /* BrazeUI in Frameworks */, 122935912CE78ED500EC1297 /* BrazeKit in Frameworks */, 1229358F2CE78EC400EC1297 /* Core in Frameworks */, @@ -8022,7 +8026,11 @@ 1229356B2CE78D0A00EC1297 /* Ecosia */ = { isa = PBXGroup; children = ( + 2C61892D2B7A8A22006B70D7 /* Analytics */, 122935962CE7913100EC1297 /* Braze */, + 2C6188F52B7A8A22006B70D7 /* Experiments */, + 122935AA2CE79D4E00EC1297 /* Extensions */, + 122935A12CE79A8600EC1297 /* Helpers */, 1229356C2CE78D0A00EC1297 /* Ecosia.h */, 1229359D2CE792B700EC1297 /* README.md */, ); @@ -8045,6 +8053,40 @@ path = Braze; sourceTree = ""; }; + 122935A12CE79A8600EC1297 /* Helpers */ = { + isa = PBXGroup; + children = ( + 2C6189242B7A8A22006B70D7 /* AppInfoProvider */, + 2C6189272B7A8A22006B70D7 /* EcosiaInstallType */, + 2C61892A2B7A8A22006B70D7 /* Version */, + ); + path = Helpers; + sourceTree = ""; + }; + 122935AA2CE79D4E00EC1297 /* Extensions */ = { + isa = PBXGroup; + children = ( + 2C6189092B7A8A22006B70D7 /* AppInfo+Ecosia.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + 122935B12CE79DFB00EC1297 /* Experiments */ = { + isa = PBXGroup; + children = ( + 122935B22CE79E0D00EC1297 /* Unleash */, + ); + path = Experiments; + sourceTree = ""; + }; + 122935B22CE79E0D00EC1297 /* Unleash */ = { + isa = PBXGroup; + children = ( + 2C6B5B402CAAF3AA00F15323 /* SeedCounterNTPExperiment.swift */, + ); + path = Unleash; + sourceTree = ""; + }; 1285E2B32CC293A20053506B /* Analytics */ = { isa = PBXGroup; children = ( @@ -8497,16 +8539,14 @@ 2C6188DA2B7A8A22006B70D7 /* L10N */, 2C6188ED2B7A8A22006B70D7 /* FeatureManagement */, 2C6188EF2B7A8A22006B70D7 /* Frontend */, - 2C6188F52B7A8A22006B70D7 /* Experiments */, 2C6188FA2B7A8A22006B70D7 /* Network */, 2C6188FC2B7A8A22006B70D7 /* BrowserKitExtensions */, + 122935B12CE79DFB00EC1297 /* Experiments */, 2C6188FF2B7A8A22006B70D7 /* Extensions */, 2C6189132B7A8A22006B70D7 /* Entitlements */, 2C6189162B7A8A22006B70D7 /* Bookmarks */, 2C6189182B7A8A22006B70D7 /* markets.json */, 2C6189192B7A8A22006B70D7 /* Fake */, - 2C6189232B7A8A22006B70D7 /* Helpers */, - 2C61892D2B7A8A22006B70D7 /* Analytics */, ); path = Ecosia; sourceTree = ""; @@ -8783,11 +8823,10 @@ 2C6188F62B7A8A22006B70D7 /* Unleash */ = { isa = PBXGroup; children = ( - 2C6188F82B7A8A22006B70D7 /* BrazeIntegrationExperiment.swift */, - 2C6B5B402CAAF3AA00F15323 /* SeedCounterNTPExperiment.swift */, 1285E2B62CC68BF00053506B /* APNConsentOnLaunchExperiment.swift */, - 2CFE600B2CD3AAB6001F35D2 /* OnboardingRemoveExperiment.swift */, + 2C6188F82B7A8A22006B70D7 /* BrazeIntegrationExperiment.swift */, 12147F322CDBA7230009D300 /* NewsletterCardExperiment.swift */, + 2CFE600B2CD3AAB6001F35D2 /* OnboardingRemoveExperiment.swift */, ); path = Unleash; sourceTree = ""; @@ -8819,7 +8858,6 @@ 2C6189062B7A8A22006B70D7 /* HomepageViewController+Ecosia.swift */, 2C6189072B7A8A22006B70D7 /* SimpleToast+Ecosia.swift */, 2C6189082B7A8A22006B70D7 /* UIView+maskedCorners.swift */, - 2C6189092B7A8A22006B70D7 /* AppInfo+Ecosia.swift */, 2C61890A2B7A8A22006B70D7 /* NumberFormatter+Ecosia.swift */, 2C61890B2B7A8A22006B70D7 /* URL+Ecosia.swift */, 2C61890C2B7A8A22006B70D7 /* BrowserCoordinator+Ecosia.swift */, @@ -8868,16 +8906,6 @@ path = Fake; sourceTree = ""; }; - 2C6189232B7A8A22006B70D7 /* Helpers */ = { - isa = PBXGroup; - children = ( - 2C6189242B7A8A22006B70D7 /* AppInfoProvider */, - 2C6189272B7A8A22006B70D7 /* EcosiaInstallType */, - 2C61892A2B7A8A22006B70D7 /* Version */, - ); - path = Helpers; - sourceTree = ""; - }; 2C6189242B7A8A22006B70D7 /* AppInfoProvider */ = { isa = PBXGroup; children = ( @@ -12451,6 +12479,7 @@ 1229358E2CE78EC400EC1297 /* Core */, 122935902CE78ED500EC1297 /* BrazeKit */, 122935922CE78ED500EC1297 /* BrazeUI */, + 122935B42CE79EF900EC1297 /* SnowplowTracker */, ); productName = Ecosia; productReference = 1229356A2CE78D0A00EC1297 /* Ecosia.framework */; @@ -13510,7 +13539,21 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 122935A22CE79A9400EC1297 /* EcosiaInstallType.swift in Sources */, + 122935B02CE79DB100EC1297 /* NewsletterCardExperiment.swift in Sources */, + 122935A72CE79B0400EC1297 /* Version.swift in Sources */, + 122935A82CE79B0800EC1297 /* Version+Extensions.swift in Sources */, + 1229359E2CE79A2600EC1297 /* Analytics.swift in Sources */, + 122935AC2CE79DA200EC1297 /* BrazeIntegrationExperiment.swift in Sources */, + 122935AE2CE79DA900EC1297 /* APNConsentOnLaunchExperiment.swift in Sources */, + 122935AF2CE79DAD00EC1297 /* OnboardingRemoveExperiment.swift in Sources */, + 122935A52CE79AF400EC1297 /* DefaultAppVersionInfoProvider.swift in Sources */, + 1229359F2CE79A2800EC1297 /* Analytics+Configuration.swift in Sources */, 1229359C2CE7927900EC1297 /* BrazeService.swift in Sources */, + 122935A62CE79AF800EC1297 /* AppVersionInfoProvider.swift in Sources */, + 122935A02CE79A3100EC1297 /* Analytics.Values.swift in Sources */, + 122935A42CE79A9A00EC1297 /* EcosiaInstallType+Extensions.swift in Sources */, + 122935AB2CE79D6F00EC1297 /* AppInfo+Ecosia.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -13784,7 +13827,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2CFE600C2CD3AAB6001F35D2 /* OnboardingRemoveExperiment.swift in Sources */, 45D5EDD2292D89A200311934 /* PinnedSite.swift in Sources */, 8A4AC0EC28C929D700439F83 /* URLSessionProtocol.swift in Sources */, C2A72A672A76938C002ACCE2 /* DownloadsCoordinator.swift in Sources */, @@ -13831,10 +13873,8 @@ 8A19ACB02A329078001C2147 /* AutofillCreditCardSettings.swift in Sources */, 2C61895D2B7A8A22006B70D7 /* NTPImpactRowView.swift in Sources */, E1E5BE252A28F7BE00248F77 /* PasswordDetailViewControllerModel.swift in Sources */, - 12147F332CDBA7230009D300 /* NewsletterCardExperiment.swift in Sources */, E1FE133129C22726002A65FF /* BackgroundFetchAndProcessingUtility.swift in Sources */, 8AD40FD527BB1C1000672675 /* LockButton.swift in Sources */, - 2C61898F2B7A8A22006B70D7 /* AppInfo+Ecosia.swift in Sources */, 5F130D2E2483508E00B0F7D0 /* FxAWebViewModel.swift in Sources */, 2109478928AFD24C00B73D44 /* OnboardingViewControllerProtocol.swift in Sources */, D0FCF7F51FE45842004A7995 /* UserScriptManager.swift in Sources */, @@ -13947,7 +13987,6 @@ FA6B2AC21D41F02D00429414 /* String+Punycode.swift in Sources */, E174963C2992B6A60096900A /* HostingTableViewSectionHeader.swift in Sources */, 8A471185287F6E4800F5A6EA /* SeparatorTableViewCell.swift in Sources */, - 2C6B5B412CAAF3AA00F15323 /* SeedCounterNTPExperiment.swift in Sources */, D301AAEE1A3A55B70078DD1D /* LegacyGridTabViewController.swift in Sources */, EB9A179B20E69A7F00B12184 /* LegacyThemeManager.swift in Sources */, EBFDB790211C83A5005CCA2F /* BrowserViewController+FindInPage.swift in Sources */, @@ -13972,7 +14011,6 @@ E1442FC2294782C3003680B0 /* NSAttributedString+Extension.swift in Sources */, 967A028E28FA026F003C35E3 /* SceneDelegate.swift in Sources */, 810FF3562B1783B0009F062C /* FeltPrivacyManager.swift in Sources */, - 2C6189A32B7A8A22006B70D7 /* AppVersionInfoProvider.swift in Sources */, C8B07A4128199500000AFCE7 /* NimbusFlaggableFeature.swift in Sources */, 0B62EFD21AD63CD100ACB9CD /* Clearables.swift in Sources */, 431C0CA925C890E500395CE4 /* DefaultBrowserOnboardingViewModel.swift in Sources */, @@ -13996,7 +14034,6 @@ E1442FD8294782D9003680B0 /* UIPasteboard+Extension.swift in Sources */, C8A4137428BE58C900D8EFEA /* WallpaperMetadataCodableProtocol.swift in Sources */, 8A93080927BFE88F0052167D /* PhotonActionSheetContainerCell.swift in Sources */, - 2C6189A52B7A8A22006B70D7 /* EcosiaInstallType+Extensions.swift in Sources */, C8B41E0A29F0284B00FE218A /* NimbusOnboardingFeatureLayer.swift in Sources */, BD4B2DE229BB4CD9005FAA50 /* SnackButton.swift in Sources */, F85C7F0E2711C556004BDBA4 /* SettingsViewController.swift in Sources */, @@ -14016,7 +14053,6 @@ D314E7F71A37B98700426A76 /* TabToolbar.swift in Sources */, 43D00493296FC48F00CB0F31 /* CreditCardSettingsEmptyView.swift in Sources */, 2C61896D2B7A8A22006B70D7 /* WelcomeTour.Step.swift in Sources */, - 2C6189A82B7A8A22006B70D7 /* Analytics.swift in Sources */, 2CCBB5252CAEA9DF006E2E10 /* SeedProgressView.swift in Sources */, CEFA977E1FAA6B490016F365 /* SyncContentSettingsViewController.swift in Sources */, C8CD80DC2A1E8C970097C3AE /* OnboardingTelemetryUtility.swift in Sources */, @@ -14061,7 +14097,6 @@ 8A2783F1275FFDC50080D29D /* KeyboardPressesHandler.swift in Sources */, E650755C1E37F747006961AC /* Swizzling.m in Sources */, 74821FC51DB56A2500EEEA72 /* OpenWithSettingsViewController.swift in Sources */, - 1285E2B72CC68BF00053506B /* APNConsentOnLaunchExperiment.swift in Sources */, C84656012887A0F700861B4A /* WallpaperMetadataUtility.swift in Sources */, E1B04A9D28E20A8300670E54 /* InstructionsView.swift in Sources */, D3B6923D1B9F9444004B87A4 /* FindInPageBar.swift in Sources */, @@ -14089,7 +14124,6 @@ CA90753824929B22005B794D /* NoLoginsView.swift in Sources */, E4B423BE1AB9FE6A007E66C8 /* ReaderModeCache.swift in Sources */, 396CDB55203C5B870034A3A3 /* TabTrayController+KeyCommands.swift in Sources */, - 2C6189AA2B7A8A22006B70D7 /* Analytics.Values.swift in Sources */, C855728629AEA3FB00AF32B0 /* SurveySurfaceViewController.swift in Sources */, 74E36D781B71323500D69DA1 /* SettingsContentViewController.swift in Sources */, EBB8950C21939E4100EB91A0 /* FirefoxTabContentBlocker.swift in Sources */, @@ -14130,7 +14164,6 @@ 9614BF4428AD1C6700D3F7EA /* AccountSyncHandler.swift in Sources */, 282DA4731A68C1E700A406E2 /* OpenSearchParser.swift in Sources */, 8A13FA8D2AD834FA007527AB /* BackgroundTabLoader.swift in Sources */, - 2C6189822B7A8A22006B70D7 /* BrazeIntegrationExperiment.swift in Sources */, D04CD74B216CF86B004FF5B0 /* DevicePickerViewController.swift in Sources */, 2C61896B2B7A8A22006B70D7 /* WelcomeTourRow.swift in Sources */, C8DC90BD2A06699E0008832B /* MarkupNode.swift in Sources */, @@ -14170,7 +14203,6 @@ 8ADC2A122A3375B900543DAA /* FxAEntryPoint.swift in Sources */, 12147F312CDA3CD80009D300 /* NTPNewsletterCardViewModel.swift in Sources */, 216A0D7B2A40F08B008077BA /* ThemeSettingsAction.swift in Sources */, - 2C6189A22B7A8A22006B70D7 /* DefaultAppVersionInfoProvider.swift in Sources */, C2506C932A6A863600F2B76E /* HistoryCoordinator.swift in Sources */, 8A3EF8012A2FCFC900796E3A /* FasterInactiveTabs.swift in Sources */, CA7FC7D324A6A9B70012F347 /* PasswordManagerDataSourceHelper.swift in Sources */, @@ -14291,7 +14323,6 @@ E47616C71AB74CA600E7DD25 /* ReaderModeBarView.swift in Sources */, D821E90E2141B71C00452C55 /* SiriSettingsViewController.swift in Sources */, EBB89507219398E500EB91A0 /* ContentBlocker.swift in Sources */, - 2C6189A42B7A8A22006B70D7 /* EcosiaInstallType.swift in Sources */, 216A0D792A40E85A008077BA /* ThemeSettingsState.swift in Sources */, 5A3A2A0D287F742C00B79EAC /* BackgroundSyncUtility.swift in Sources */, 21AFCFEE2AE80B700027E9CE /* TabsCoordinator.swift in Sources */, @@ -14457,7 +14488,6 @@ 9636D92C27F9E50100771F5E /* GleanPlumbMessageStore.swift in Sources */, 213B67A627CE682B000542F5 /* StartAtHomeHelper.swift in Sources */, E10A1F752863BC51001EEA80 /* LegacyInactiveTabItemCell.swift in Sources */, - 2C6189A72B7A8A22006B70D7 /* Version+Extensions.swift in Sources */, 8A8629E2288096C40096DDB1 /* BookmarksFolderCell.swift in Sources */, DAE6DF1B29AD78DA0094BD1B /* BrowserViewController+ZoomPage.swift in Sources */, 8AB8574A27D97CE90075C173 /* HomePanelDelegate.swift in Sources */, @@ -14528,7 +14558,6 @@ C2D71B992A384F6A003DEC7A /* ThemedLeftAlignedTableViewCell.swift in Sources */, 21A7C44E283539170071D996 /* IntroViewModel.swift in Sources */, E1FF93E228A2E55700E6360E /* WallpaperSelectorViewController.swift in Sources */, - 2C6189A92B7A8A22006B70D7 /* Analytics+Configuration.swift in Sources */, D3A9949C1A3686BD008AD1AC /* BrowserViewController.swift in Sources */, 8A5D1CBB2A30DC0B005AD35C /* ConnectSetting.swift in Sources */, E6CF28E71CB43B7900151AB3 /* SensitiveViewController.swift in Sources */, @@ -14571,6 +14600,7 @@ BD4B2DE429BB4D9A005FAA50 /* TimerSnackBar.swift in Sources */, 810FF3582B1784E7009F062C /* PrivateModeAction.swift in Sources */, 21EA466A2B04130500AAAB2D /* TabsPanelState.swift in Sources */, + 122935B32CE79E2400EC1297 /* SeedCounterNTPExperiment.swift in Sources */, D04D1B862097859B0074B35F /* DownloadToast.swift in Sources */, C29B64EE2AD937D500F3244B /* QRCodeNavigationHandler.swift in Sources */, 8A19ACB42A3290D9001C2147 /* ContentBlockerSetting.swift in Sources */, @@ -14585,7 +14615,6 @@ 7B844E3D1BBDDB9D00E733A2 /* ChevronView.swift in Sources */, 43A5643823CD1E1C00B6857D /* UpdateViewController.swift in Sources */, 437A9B682681256800FB41C1 /* LegacyInactiveTabCell.swift in Sources */, - 2C6189A62B7A8A22006B70D7 /* Version.swift in Sources */, 1D69FF8D27B17286001F660E /* HomeLogoHeaderCell.swift in Sources */, E4C358551AF144BA00299F7E /* FSReadingList.m in Sources */, 8AE1E1CB27B18F560024C45E /* SearchBarSettingsViewController.swift in Sources */, @@ -19820,7 +19849,7 @@ INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -19922,7 +19951,7 @@ INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -20021,7 +20050,7 @@ INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -20125,7 +20154,7 @@ INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -20230,7 +20259,7 @@ INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 15; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -22674,6 +22703,11 @@ package = 126509832CD925B30011BA36 /* XCRemoteSwiftPackageReference "braze-swift-sdk" */; productName = BrazeUI; }; + 122935B42CE79EF900EC1297 /* SnowplowTracker */ = { + isa = XCSwiftPackageProductDependency; + package = 2C6189EF2B7B7D48006B70D7 /* XCRemoteSwiftPackageReference "snowplow-ios-tracker" */; + productName = SnowplowTracker; + }; 126509842CD925B40011BA36 /* BrazeKit */ = { isa = XCSwiftPackageProductDependency; package = 126509832CD925B30011BA36 /* XCRemoteSwiftPackageReference "braze-swift-sdk" */; diff --git a/Client/Coordinators/Browser/BrowserCoordinator.swift b/Client/Coordinators/Browser/BrowserCoordinator.swift index cd254410d5205..78280eb3d10f6 100644 --- a/Client/Coordinators/Browser/BrowserCoordinator.swift +++ b/Client/Coordinators/Browser/BrowserCoordinator.swift @@ -11,6 +11,7 @@ import Redux import TabDataStore // Ecosia: Import Core import Core +import Ecosia class BrowserCoordinator: BaseCoordinator, LaunchCoordinatorDelegate, diff --git a/Client/Coordinators/Launch/LaunchCoordinator.swift b/Client/Coordinators/Launch/LaunchCoordinator.swift index a23347158dca7..cf5a793b8d40c 100644 --- a/Client/Coordinators/Launch/LaunchCoordinator.swift +++ b/Client/Coordinators/Launch/LaunchCoordinator.swift @@ -4,6 +4,7 @@ import Common import Foundation +import Ecosia protocol LaunchCoordinatorDelegate: AnyObject { func didFinishLaunch(from coordinator: LaunchCoordinator) diff --git a/Client/Coordinators/Router/RouteBuilder.swift b/Client/Coordinators/Router/RouteBuilder.swift index eedbe4749b5cb..cd85ae3a66ddf 100644 --- a/Client/Coordinators/Router/RouteBuilder.swift +++ b/Client/Coordinators/Router/RouteBuilder.swift @@ -5,6 +5,7 @@ import Foundation import CoreSpotlight import Shared +import Ecosia final class RouteBuilder { private var isPrivate = false diff --git a/Client/Ecosia/Bookmarks/BookmarksExchange.swift b/Client/Ecosia/Bookmarks/BookmarksExchange.swift index e8ef1de5c92bf..7e5d71377f5fd 100644 --- a/Client/Ecosia/Bookmarks/BookmarksExchange.swift +++ b/Client/Ecosia/Bookmarks/BookmarksExchange.swift @@ -6,6 +6,7 @@ import Foundation import Core import Shared import Storage +import Ecosia protocol BookmarksExchangable { func export(bookmarks: [Core.BookmarkItem], in viewController: UIViewController, barButtonItem: UIBarButtonItem) async throws diff --git a/Client/Ecosia/Experiments/Unleash/SeedCounterNTPExperiment.swift b/Client/Ecosia/Experiments/Unleash/SeedCounterNTPExperiment.swift index 15d73761dbcd5..e1d429d8b8c77 100644 --- a/Client/Ecosia/Experiments/Unleash/SeedCounterNTPExperiment.swift +++ b/Client/Ecosia/Experiments/Unleash/SeedCounterNTPExperiment.swift @@ -4,6 +4,7 @@ import Foundation import Core +import Ecosia struct SeedCounterNTPExperiment { private enum Variant: String { diff --git a/Client/Ecosia/Extensions/AppSettingsTableViewController+Ecosia.swift b/Client/Ecosia/Extensions/AppSettingsTableViewController+Ecosia.swift index 3ed5dfaf282b2..59dc3dcafa53d 100644 --- a/Client/Ecosia/Extensions/AppSettingsTableViewController+Ecosia.swift +++ b/Client/Ecosia/Extensions/AppSettingsTableViewController+Ecosia.swift @@ -5,6 +5,7 @@ import Common import UIKit import Shared +import Ecosia extension AppSettingsTableViewController { diff --git a/Client/Ecosia/Extensions/BrowserViewController+Ecosia.swift b/Client/Ecosia/Extensions/BrowserViewController+Ecosia.swift index c44379ff1c527..48186962cab2d 100644 --- a/Client/Ecosia/Extensions/BrowserViewController+Ecosia.swift +++ b/Client/Ecosia/Extensions/BrowserViewController+Ecosia.swift @@ -5,6 +5,7 @@ import UIKit import Core import Shared +import Ecosia extension BrowserViewController: HomepageViewControllerDelegate { func homeDidTapSearchButton(_ home: HomepageViewController) { diff --git a/Client/Ecosia/Settings/EcosiaDebugSettings.swift b/Client/Ecosia/Settings/EcosiaDebugSettings.swift index 292b4a55b133c..61567892ba892 100644 --- a/Client/Ecosia/Settings/EcosiaDebugSettings.swift +++ b/Client/Ecosia/Settings/EcosiaDebugSettings.swift @@ -7,6 +7,7 @@ import UIKit import Core import Shared import Common +import Ecosia final class PushBackInstallation: HiddenSetting { override var title: NSAttributedString? { diff --git a/Client/Ecosia/Settings/EcosiaSettings.swift b/Client/Ecosia/Settings/EcosiaSettings.swift index 384453d591b98..b6d53ca087c09 100644 --- a/Client/Ecosia/Settings/EcosiaSettings.swift +++ b/Client/Ecosia/Settings/EcosiaSettings.swift @@ -6,6 +6,7 @@ import Foundation import Core import Shared import Common +import Ecosia var ecosiaDisclosureIndicator: UIImageView { let config = UIImage.SymbolConfiguration(pointSize: 16) diff --git a/Client/Ecosia/Settings/NTPCustomizationSettingsViewController.swift b/Client/Ecosia/Settings/NTPCustomizationSettingsViewController.swift index 1cb207094a6c1..187884fd166cc 100644 --- a/Client/Ecosia/Settings/NTPCustomizationSettingsViewController.swift +++ b/Client/Ecosia/Settings/NTPCustomizationSettingsViewController.swift @@ -5,6 +5,7 @@ import Foundation import Shared import Common +import Ecosia final class NTPCustomizationSettingsViewController: SettingsTableViewController { init() { diff --git a/Client/Ecosia/UI/EmptyBookmarksView.swift b/Client/Ecosia/UI/EmptyBookmarksView.swift index ff9ba0cfcf32e..cd00c309d5a88 100644 --- a/Client/Ecosia/UI/EmptyBookmarksView.swift +++ b/Client/Ecosia/UI/EmptyBookmarksView.swift @@ -4,6 +4,7 @@ import UIKit import Common +import Ecosia final class EmptyBookmarksView: UIView, Themeable { diff --git a/Client/Ecosia/UI/LoadingScreen.swift b/Client/Ecosia/UI/LoadingScreen.swift index 63f5d4a8d8aa8..a87a04bd13290 100644 --- a/Client/Ecosia/UI/LoadingScreen.swift +++ b/Client/Ecosia/UI/LoadingScreen.swift @@ -4,6 +4,7 @@ import UIKit import Core +import Ecosia final class LoadingScreen: UIViewController { private weak var profile: Profile! diff --git a/Client/Ecosia/UI/MarketsController.swift b/Client/Ecosia/UI/MarketsController.swift index cf1f2bb1eb1b5..9962a25f3ef70 100644 --- a/Client/Ecosia/UI/MarketsController.swift +++ b/Client/Ecosia/UI/MarketsController.swift @@ -5,6 +5,7 @@ import Core import UIKit import Common +import Ecosia final class Markets { private(set) static var all: [Market] = { diff --git a/Client/Ecosia/UI/MultiplyImpact/MultiplyImpact.swift b/Client/Ecosia/UI/MultiplyImpact/MultiplyImpact.swift index fc88fc533300a..dfe9c1683f3b6 100644 --- a/Client/Ecosia/UI/MultiplyImpact/MultiplyImpact.swift +++ b/Client/Ecosia/UI/MultiplyImpact/MultiplyImpact.swift @@ -8,6 +8,7 @@ import UniformTypeIdentifiers import MobileCoreServices import LinkPresentation import Common +import Ecosia final class MultiplyImpact: UIViewController, Themeable { diff --git a/Client/Ecosia/UI/NTP/AboutEcosia/AboutEcosiaSection.swift b/Client/Ecosia/UI/NTP/AboutEcosia/AboutEcosiaSection.swift index a9cde8ee00b6e..e78abdf1e492d 100644 --- a/Client/Ecosia/UI/NTP/AboutEcosia/AboutEcosiaSection.swift +++ b/Client/Ecosia/UI/NTP/AboutEcosia/AboutEcosiaSection.swift @@ -4,6 +4,7 @@ import Foundation import Core +import Ecosia enum AboutEcosiaSection: Int, CaseIterable { case diff --git a/Client/Ecosia/UI/NTP/AboutEcosia/NTPAboutEcosiaCell.swift b/Client/Ecosia/UI/NTP/AboutEcosia/NTPAboutEcosiaCell.swift index 34ba596f76b6f..16f8fa74fd0c6 100644 --- a/Client/Ecosia/UI/NTP/AboutEcosia/NTPAboutEcosiaCell.swift +++ b/Client/Ecosia/UI/NTP/AboutEcosia/NTPAboutEcosiaCell.swift @@ -4,6 +4,7 @@ import Foundation import Common +import Ecosia final class NTPAboutEcosiaCell: UICollectionViewCell, ReusableCell { struct UX { diff --git a/Client/Ecosia/UI/NTP/Customization/CustomizableNTPSettingConfig.swift b/Client/Ecosia/UI/NTP/Customization/CustomizableNTPSettingConfig.swift index e23f2eebbef7a..b6bffd706e80c 100644 --- a/Client/Ecosia/UI/NTP/Customization/CustomizableNTPSettingConfig.swift +++ b/Client/Ecosia/UI/NTP/Customization/CustomizableNTPSettingConfig.swift @@ -4,6 +4,7 @@ import Foundation import Core +import Ecosia enum CustomizableNTPSettingConfig: CaseIterable { case topSites diff --git a/Client/Ecosia/UI/NTP/DefaultBrowser.swift b/Client/Ecosia/UI/NTP/DefaultBrowser.swift index b4a17e858d72b..a79aa9d9fcb48 100644 --- a/Client/Ecosia/UI/NTP/DefaultBrowser.swift +++ b/Client/Ecosia/UI/NTP/DefaultBrowser.swift @@ -4,6 +4,7 @@ import UIKit import Common +import Ecosia @available(iOS 14, *) protocol DefaultBrowserDelegate: AnyObject { diff --git a/Client/Ecosia/UI/NTP/Library/NTPLibraryCell.swift b/Client/Ecosia/UI/NTP/Library/NTPLibraryCell.swift index 4d4f94028d40c..778fc9b74ae97 100644 --- a/Client/Ecosia/UI/NTP/Library/NTPLibraryCell.swift +++ b/Client/Ecosia/UI/NTP/Library/NTPLibraryCell.swift @@ -5,6 +5,7 @@ import Shared import UIKit import Common +import Ecosia class NTPLibraryCell: UICollectionViewCell, Themeable, ReusableCell { diff --git a/Client/Ecosia/UI/NTP/News/NTPNewsCellViewModel.swift b/Client/Ecosia/UI/NTP/News/NTPNewsCellViewModel.swift index 2bb2cc30ca7bd..3a8b44e0f309a 100644 --- a/Client/Ecosia/UI/NTP/News/NTPNewsCellViewModel.swift +++ b/Client/Ecosia/UI/NTP/News/NTPNewsCellViewModel.swift @@ -6,6 +6,7 @@ import Foundation import Shared import Core import Common +import Ecosia protocol NTPNewsCellDelegate: AnyObject { func openSeeAllNews() diff --git a/Client/Ecosia/UI/NTP/News/NewsController.swift b/Client/Ecosia/UI/NTP/News/NewsController.swift index b3a653f736ffa..3b230159025d1 100644 --- a/Client/Ecosia/UI/NTP/News/NewsController.swift +++ b/Client/Ecosia/UI/NTP/News/NewsController.swift @@ -5,6 +5,7 @@ import Core import UIKit import Common +import Ecosia final class NewsController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, Themeable { diff --git a/Client/Ecosia/UI/NTP/NudgeCards/Newsletter/NTPNewsletterCardViewModel.swift b/Client/Ecosia/UI/NTP/NudgeCards/Newsletter/NTPNewsletterCardViewModel.swift index da92855639d5e..c54935b76d21d 100644 --- a/Client/Ecosia/UI/NTP/NudgeCards/Newsletter/NTPNewsletterCardViewModel.swift +++ b/Client/Ecosia/UI/NTP/NudgeCards/Newsletter/NTPNewsletterCardViewModel.swift @@ -3,6 +3,7 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/ import Foundation +import Ecosia final class NTPNewsletterCardViewModel: NTPConfigurableNudgeCardCellViewModel { override var title: String { diff --git a/Client/Ecosia/UI/Onboarding/Welcome.swift b/Client/Ecosia/UI/Onboarding/Welcome.swift index f41c62efe5779..a0f1fade39a80 100644 --- a/Client/Ecosia/UI/Onboarding/Welcome.swift +++ b/Client/Ecosia/UI/Onboarding/Welcome.swift @@ -5,6 +5,7 @@ import UIKit import Core import Common +import Ecosia protocol WelcomeDelegate: AnyObject { func welcomeDidFinish(_ welcome: Welcome) diff --git a/Client/Ecosia/UI/Onboarding/WelcomeTour.Step.swift b/Client/Ecosia/UI/Onboarding/WelcomeTour.Step.swift index 89ea65e0dbf8e..a54452291be4e 100644 --- a/Client/Ecosia/UI/Onboarding/WelcomeTour.Step.swift +++ b/Client/Ecosia/UI/Onboarding/WelcomeTour.Step.swift @@ -4,6 +4,7 @@ import UIKit import Core +import Ecosia extension WelcomeTour { diff --git a/Client/Ecosia/UI/Onboarding/WelcomeTour.swift b/Client/Ecosia/UI/Onboarding/WelcomeTour.swift index f9a35bb99abd5..16309ce5cbb2a 100644 --- a/Client/Ecosia/UI/Onboarding/WelcomeTour.swift +++ b/Client/Ecosia/UI/Onboarding/WelcomeTour.swift @@ -5,6 +5,7 @@ import UIKit import Core import Common +import Ecosia protocol WelcomeTourDelegate: AnyObject { func welcomeTourDidFinish(_ tour: WelcomeTour) diff --git a/Client/Ecosia/UI/WhatsNew/DataProvider/WhatsNewLocalDataProvider.swift b/Client/Ecosia/UI/WhatsNew/DataProvider/WhatsNewLocalDataProvider.swift index 9fa54d814b8a0..481fbd1aef682 100644 --- a/Client/Ecosia/UI/WhatsNew/DataProvider/WhatsNewLocalDataProvider.swift +++ b/Client/Ecosia/UI/WhatsNew/DataProvider/WhatsNewLocalDataProvider.swift @@ -6,6 +6,7 @@ import Foundation import Shared import Core import Common +import Ecosia /// A local data provider for fetching What's New items based on app version updates. final class WhatsNewLocalDataProvider: WhatsNewDataProvider { diff --git a/Client/Frontend/Browser/MainMenuActionHelper.swift b/Client/Frontend/Browser/MainMenuActionHelper.swift index 03bd44ef9d6d2..0fe3950c85232 100644 --- a/Client/Frontend/Browser/MainMenuActionHelper.swift +++ b/Client/Frontend/Browser/MainMenuActionHelper.swift @@ -13,6 +13,7 @@ import Common import Core // Ecosia: Need SafariServices to enable "open in safari" action import SafariServices +import Ecosia protocol ToolBarActionMenuDelegate: AnyObject { func updateToolbarState() diff --git a/Client/Frontend/Home/HomepageViewModel.swift b/Client/Frontend/Home/HomepageViewModel.swift index 9033ebc844d30..8982fce938fed 100644 --- a/Client/Frontend/Home/HomepageViewModel.swift +++ b/Client/Frontend/Home/HomepageViewModel.swift @@ -6,6 +6,7 @@ import Common import MozillaAppServices import Shared import Core +import Ecosia protocol HomepageViewModelDelegate: AnyObject { func reloadView() diff --git a/Client/Frontend/Home/TopSites/TopSitesViewModel.swift b/Client/Frontend/Home/TopSites/TopSitesViewModel.swift index a68bb9bcaf850..14820a21df864 100644 --- a/Client/Frontend/Home/TopSites/TopSitesViewModel.swift +++ b/Client/Frontend/Home/TopSites/TopSitesViewModel.swift @@ -8,6 +8,7 @@ import Shared import Storage // Ecosia: importing Core import Core +import Ecosia class TopSitesViewModel { struct UX { diff --git a/Client/Frontend/Library/Bookmarks/BookmarksPanel.swift b/Client/Frontend/Library/Bookmarks/BookmarksPanel.swift index b783c2cb16303..a4d98b052c54d 100644 --- a/Client/Frontend/Library/Bookmarks/BookmarksPanel.swift +++ b/Client/Frontend/Library/Bookmarks/BookmarksPanel.swift @@ -8,6 +8,7 @@ import Storage import Shared import SiteImageView import Core +import Ecosia let LocalizedRootBookmarkFolderStrings = [ BookmarkRoots.MenuFolderGUID: String.BookmarksFolderTitleMenu, diff --git a/Client/Frontend/Settings/Main/DefaultBrowserSetting.swift b/Client/Frontend/Settings/Main/DefaultBrowserSetting.swift index 3f9809949946d..a4bd427c9e2e1 100644 --- a/Client/Frontend/Settings/Main/DefaultBrowserSetting.swift +++ b/Client/Frontend/Settings/Main/DefaultBrowserSetting.swift @@ -5,6 +5,7 @@ import Common import Foundation import Shared +import Ecosia class DefaultBrowserSetting: Setting { override var accessibilityIdentifier: String? { return "DefaultBrowserSettings" } diff --git a/Client/Frontend/Settings/SearchBar/SearchBarSettingsViewModel.swift b/Client/Frontend/Settings/SearchBar/SearchBarSettingsViewModel.swift index 7e4fef8798f4e..766635e63a407 100644 --- a/Client/Frontend/Settings/SearchBar/SearchBarSettingsViewModel.swift +++ b/Client/Frontend/Settings/SearchBar/SearchBarSettingsViewModel.swift @@ -5,6 +5,7 @@ import Common import Foundation import Shared +import Ecosia enum SearchBarPosition: String, FlaggableFeatureOptions { case bottom diff --git a/Client/TabManagement/TabManagerImplementation.swift b/Client/TabManagement/TabManagerImplementation.swift index 9684c344862e2..6e39c6920749c 100644 --- a/Client/TabManagement/TabManagerImplementation.swift +++ b/Client/TabManagement/TabManagerImplementation.swift @@ -7,6 +7,7 @@ import TabDataStore import Storage import Common import Shared +import Ecosia // This class subclasses the legacy tab manager temporarily so we can // gradually migrate to the new system diff --git a/Client/TabManagement/TabMigrationUtility.swift b/Client/TabManagement/TabMigrationUtility.swift index 46d107b794e44..1e239d200c465 100644 --- a/Client/TabManagement/TabMigrationUtility.swift +++ b/Client/TabManagement/TabMigrationUtility.swift @@ -5,6 +5,7 @@ import Common import Shared import TabDataStore +import Ecosia protocol TabMigrationUtility { var shouldRunMigration: Bool { get } diff --git a/Client/Ecosia/Analytics/Analytics+Configuration.swift b/Ecosia/Analytics/Analytics+Configuration.swift similarity index 98% rename from Client/Ecosia/Analytics/Analytics+Configuration.swift rename to Ecosia/Analytics/Analytics+Configuration.swift index 4fa023e8ed5ab..dccd31fc1f76e 100644 --- a/Client/Ecosia/Analytics/Analytics+Configuration.swift +++ b/Ecosia/Analytics/Analytics+Configuration.swift @@ -82,7 +82,7 @@ extension Analytics { /// Checks if a day has passed since the last check for a specific event. /// - Parameter identifier: A unique identifier used to store and retrieve the last check date from `UserDefaults`. /// - Returns: A Boolean value indicating whether a day has passed since the last check. If no previous check exists, returns `true` and records the current date. - static func hasDayPassedSinceLastCheck(for identifier: String) -> Bool { + public static func hasDayPassedSinceLastCheck(for identifier: String) -> Bool { let now = Date() let defaults = UserDefaults.standard diff --git a/Client/Ecosia/Analytics/Analytics.Values.swift b/Ecosia/Analytics/Analytics.Values.swift similarity index 78% rename from Client/Ecosia/Analytics/Analytics.Values.swift rename to Ecosia/Analytics/Analytics.Values.swift index 89cc72eeedad5..75348bbf7a778 100644 --- a/Client/Ecosia/Analytics/Analytics.Values.swift +++ b/Ecosia/Analytics/Analytics.Values.swift @@ -5,7 +5,7 @@ import Foundation extension Analytics { - enum Category: String { + public enum Category: String { case activity, bookmarks, @@ -24,27 +24,27 @@ extension Analytics { settings } - enum Label: String { + public enum Label: String { case analytics, market, toolbar - enum Bookmarks: String { + public enum Bookmarks: String { case importFunctionality = "import_functionality", learnMore = "learn_more", `import` } - enum DefaultBrowser: String { + public enum DefaultBrowser: String { case deeplink = "default_browser_deeplink", promo = "default_browser_promo", settings = "default_browser_settings" } - enum Menu: String { + public enum Menu: String { case bookmarks, copyLink = "copy_link", @@ -63,7 +63,7 @@ extension Analytics { zoom } - enum MenuStatus: String { + public enum MenuStatus: String { case bookmark, darkMode = "dark_mode", @@ -71,12 +71,12 @@ extension Analytics { shortcut } - enum Migration: String { + public enum Migration: String { case tabs } - enum Navigation: String { + public enum Navigation: String { case inapp, financialReports = "financial_reports", @@ -87,12 +87,12 @@ extension Analytics { terms } - enum NewsletterCardExperiment: String { + public enum NewsletterCardExperiment: String { case ntpCard = "ntp_card" } - enum NTP: String { + public enum NTP: String { case about, climateCounter = "climate_counter", @@ -104,13 +104,13 @@ extension Analytics { topSites = "top_sites" } - enum Onboarding: String { + public enum Onboarding: String { case next, skip } - enum Referral: String { + public enum Referral: String { case invite, inviteScreen = "invite_screen", @@ -120,7 +120,7 @@ extension Analytics { } } - enum Action: String { + public enum Action: String { case change, click, @@ -134,13 +134,13 @@ extension Analytics { success, view - enum Activity: String { + public enum Activity: String { case launch, resume } - enum APNConsent: String { + public enum APNConsent: String { case allow, deny, @@ -148,40 +148,40 @@ extension Analytics { view } - enum Bookmarks: String { + public enum Bookmarks: String { case `import` } - enum BrazeIAM: String { + public enum BrazeIAM: String { case click, dismiss, view } - enum NewsletterCardExperiment: String { + public enum NewsletterCardExperiment: String { case click, dismiss, view } - enum NTPCustomization: String { + public enum NTPCustomization: String { case click, disable, enable } - enum Promo: String { + public enum Promo: String { case click, close, view } - enum Referral: String { + public enum Referral: String { case claim, click, @@ -190,14 +190,14 @@ extension Analytics { view } - enum SeedCounter: String { + public enum SeedCounter: String { case level, collect, click } - enum TopSite: String { + public enum TopSite: String { case click, openNewTab = "open_new_tab", @@ -208,19 +208,19 @@ extension Analytics { } } - enum Property: String { + public enum Property: String { case enable, disable, home - enum APNConsent: String { + public enum APNConsent: String { case home, onLaunchExperiment = "on_launch_experiment" } - enum Bookmarks: String { + public enum Bookmarks: String { case `import`, export, @@ -229,7 +229,7 @@ extension Analytics { error } - enum Library: String { + public enum Library: String { case bookmarks, downloads, @@ -237,7 +237,7 @@ extension Analytics { readingList = "reading_list" } - enum OnboardingPage: String, CaseIterable { + public enum OnboardingPage: String, CaseIterable { case start, profits, @@ -246,14 +246,14 @@ extension Analytics { transparentFinances = "transparent_finances" } - enum ShareContent: String { + public enum ShareContent: String { case ntp, web, file } - enum TopSite: String { + public enum TopSite: String { case `default`, mostVisited = "most_visited", diff --git a/Client/Ecosia/Analytics/Analytics.swift b/Ecosia/Analytics/Analytics.swift similarity index 83% rename from Client/Ecosia/Analytics/Analytics.swift rename to Ecosia/Analytics/Analytics.swift index 8a0bb5780f34f..87ddf669aecfc 100644 --- a/Client/Ecosia/Analytics/Analytics.swift +++ b/Ecosia/Analytics/Analytics.swift @@ -23,7 +23,7 @@ open class Analytics { Self.appResumeDailyTrackingPluginConfiguration]) } - static var shared = Analytics() + public static var shared = Analytics() private var tracker: TrackerController internal init() { @@ -50,18 +50,18 @@ open class Analytics { return SelfDescribingJson(schema: abTestSchema, andDictionary: abTestContext) } - func reset() { + public func reset() { User.shared.analyticsId = .init() tracker = Self.tracker } // MARK: App events - func install() { + public func install() { track(SelfDescribing(schema: Self.installSchema, payload: ["app_v": Bundle.version as NSObject])) } - func activity(_ action: Action.Activity) { + public func activity(_ action: Action.Activity) { let event = Structured(category: Category.activity.rawValue, action: action.rawValue) .label(Analytics.Label.Navigation.inapp.rawValue) @@ -72,7 +72,7 @@ open class Analytics { } // MARK: Bookmarks - func bookmarksPerformImportExport(_ property: Property.Bookmarks) { + public func bookmarksPerformImportExport(_ property: Property.Bookmarks) { let event = Structured(category: Category.bookmarks.rawValue, action: Action.click.rawValue) .label(Label.Bookmarks.importFunctionality.rawValue) @@ -80,7 +80,7 @@ open class Analytics { track(event) } - func bookmarksEmptyLearnMoreClicked() { + public func bookmarksEmptyLearnMoreClicked() { let event = Structured(category: Category.bookmarks.rawValue, action: Action.click.rawValue) .label(Label.Bookmarks.learnMore.rawValue) @@ -88,7 +88,7 @@ open class Analytics { track(event) } - func bookmarksImportEnded(_ property: Property.Bookmarks) { + public func bookmarksImportEnded(_ property: Property.Bookmarks) { let event = Structured(category: Category.bookmarks.rawValue, action: Action.Bookmarks.import.rawValue) .label(Label.Bookmarks.import.rawValue) @@ -97,14 +97,14 @@ open class Analytics { } // MARK: Braze IAM - func brazeIAM(action: Action.BrazeIAM, messageOrButtonId: String?) { + public func brazeIAM(action: Action.BrazeIAM, messageOrButtonId: String?) { track(Structured(category: Category.brazeIAM.rawValue, action: action.rawValue) .property(messageOrButtonId)) } // MARK: Default Browser - func appOpenAsDefaultBrowser() { + public func appOpenAsDefaultBrowser() { let event = Structured(category: Category.external.rawValue, action: Action.receive.rawValue) .label(Label.DefaultBrowser.deeplink.rawValue) @@ -112,7 +112,7 @@ open class Analytics { track(event) } - func defaultBrowser(_ action: Action.Promo) { + public func defaultBrowser(_ action: Action.Promo) { let event = Structured(category: Category.browser.rawValue, action: action.rawValue) .label(Label.DefaultBrowser.promo.rawValue) @@ -121,21 +121,21 @@ open class Analytics { track(event) } - func defaultBrowserSettings() { + public func defaultBrowserSettings() { track(Structured(category: Category.browser.rawValue, action: Action.open.rawValue) .label(Label.DefaultBrowser.settings.rawValue)) } // MARK: Menu - func menuClick(_ item: Analytics.Label.Menu) { + public func menuClick(_ item: Analytics.Label.Menu) { let event = Structured(category: Category.menu.rawValue, action: Action.click.rawValue) .label(item.rawValue) track(event) } - func menuShare(_ content: Property.ShareContent) { + public func menuShare(_ content: Property.ShareContent) { let event = Structured(category: Category.menu.rawValue, action: Action.click.rawValue) .label(Label.Menu.share.rawValue) @@ -143,7 +143,7 @@ open class Analytics { track(event) } - func menuStatus(changed item: Analytics.Label.MenuStatus, to: Bool) { + public func menuStatus(changed item: Analytics.Label.MenuStatus, to: Bool) { let event = Structured(category: Category.menuStatus.rawValue, action: Action.click.rawValue) .label(item.rawValue) @@ -152,12 +152,12 @@ open class Analytics { } // MARK: Migration - func migration(_ success: Bool) { + public func migration(_ success: Bool) { track(Structured(category: Category.migration.rawValue, action: success ? Action.success.rawValue : Action.error.rawValue)) } - func migrationError(in migration: Label.Migration, message: String) { + public func migrationError(in migration: Label.Migration, message: String) { track(Structured(category: Category.migration.rawValue, action: Action.error.rawValue) .label(migration.rawValue) @@ -165,20 +165,20 @@ open class Analytics { } // MARK: Navigation - func navigation(_ action: Action, label: Label.Navigation) { + public func navigation(_ action: Action, label: Label.Navigation) { track(Structured(category: Category.navigation.rawValue, action: action.rawValue) .label(label.rawValue)) } - func navigationOpenNews(_ id: String) { + public func navigationOpenNews(_ id: String) { track(Structured(category: Category.navigation.rawValue, action: Action.open.rawValue) .label(Label.Navigation.news.rawValue) .property(id)) } - func navigationChangeMarket(_ new: String) { + public func navigationChangeMarket(_ new: String) { track(Structured(category: Category.navigation.rawValue, action: Action.change.rawValue) .label(Label.market.rawValue) @@ -186,20 +186,20 @@ open class Analytics { } // MARK: `NewsletterCardExperiment` - func newsletterCardExperiment(action: Action.NewsletterCardExperiment) { + public func newsletterCardExperiment(action: Action.NewsletterCardExperiment) { track(Structured(category: Category.newsletterExperiment.rawValue, action: action.rawValue) .label(Label.NewsletterCardExperiment.ntpCard.rawValue)) } // MARK: NTP - func ntpCustomisation(_ action: Action.NTPCustomization, label: Label.NTP) { + public func ntpCustomisation(_ action: Action.NTPCustomization, label: Label.NTP) { track(Structured(category: Category.ntp.rawValue, action: action.rawValue) .label(label.rawValue)) } - func ntpTopSite(_ action: Action.TopSite, property: Property.TopSite, position: NSNumber? = nil) { + public func ntpTopSite(_ action: Action.TopSite, property: Property.TopSite, position: NSNumber? = nil) { track(Structured(category: Category.ntp.rawValue, action: action.rawValue) .label(Label.NTP.topSites.rawValue) @@ -207,14 +207,14 @@ open class Analytics { .value(position)) } - func ntpLibraryItem(_ action: Action, property: Property.Library) { + public func ntpLibraryItem(_ action: Action, property: Property.Library) { track(Structured(category: Category.ntp.rawValue, action: action.rawValue) .label(Label.NTP.quickActions.rawValue) .property(property.rawValue)) } - func ntpSeedCounterExperiment(_ action: Action.SeedCounter, + public func ntpSeedCounterExperiment(_ action: Action.SeedCounter, value: NSNumber) { track(Structured(category: Category.ntp.rawValue, action: action.rawValue) @@ -224,7 +224,7 @@ open class Analytics { } // MARK: Onboarding - func introDisplaying(page: Property.OnboardingPage?, at index: Int) { + public func introDisplaying(page: Property.OnboardingPage?, at index: Int) { guard let page else { return } @@ -235,7 +235,7 @@ open class Analytics { track(event) } - func introClick(_ label: Label.Onboarding, page: Property.OnboardingPage?, index: Int) { + public func introClick(_ label: Label.Onboarding, page: Property.OnboardingPage?, index: Int) { guard let page else { return } @@ -248,7 +248,7 @@ open class Analytics { } // MARK: Push Notifications Consent - func apnConsentOnLaunchExperiment(_ action: Action.APNConsent) { + public func apnConsentOnLaunchExperiment(_ action: Action.APNConsent) { let event = Structured(category: Category.pushNotificationConsent.rawValue, action: action.rawValue) .property(Property.APNConsent.onLaunchExperiment.rawValue) @@ -257,21 +257,21 @@ open class Analytics { } // MARK: Referrals - func referral(action: Action.Referral, label: Label.Referral? = nil) { + public func referral(action: Action.Referral, label: Label.Referral? = nil) { track(Structured(category: Category.invitations.rawValue, action: action.rawValue) .label(label?.rawValue)) } // MARK: Settings - func searchbarChanged(to position: String) { + public func searchbarChanged(to position: String) { track(Structured(category: Category.settings.rawValue, action: Action.change.rawValue) .label(Label.toolbar.rawValue) .property(position)) } - func sendAnonymousUsageDataSetting(enabled: Bool) { + public func sendAnonymousUsageDataSetting(enabled: Bool) { // This is the only place where the tracker should be directly // used since we want to send this just as the user opts out _ = tracker.track(Structured(category: Category.settings.rawValue, diff --git a/Ecosia/Braze/BrazeService.swift b/Ecosia/Braze/BrazeService.swift index 3418e57406907..19da37c38f90a 100644 --- a/Ecosia/Braze/BrazeService.swift +++ b/Ecosia/Braze/BrazeService.swift @@ -147,15 +147,15 @@ extension BrazeService { extension BrazeService: BrazeInAppMessageUIDelegate { public func inAppMessage(_ ui: BrazeInAppMessageUI, didPresent message: Braze.InAppMessage, view: any InAppMessageView) { -// Analytics.shared.brazeIAM(action: .view, messageOrButtonId: message.id) + Analytics.shared.brazeIAM(action: .view, messageOrButtonId: message.id) } public func inAppMessage(_ ui: BrazeInAppMessageUI, didDismiss message: Braze.InAppMessage, view: any InAppMessageView) { -// Analytics.shared.brazeIAM(action: .dismiss, messageOrButtonId: message.id) + Analytics.shared.brazeIAM(action: .dismiss, messageOrButtonId: message.id) } public func inAppMessage(_ ui: BrazeInAppMessageUI, shouldProcess clickAction: Braze.InAppMessage.ClickAction, buttonId: String?, message: Braze.InAppMessage, view: any InAppMessageView) -> Bool { -// Analytics.shared.brazeIAM(action: .click, messageOrButtonId: buttonId) + Analytics.shared.brazeIAM(action: .click, messageOrButtonId: buttonId) return true } } diff --git a/Client/Ecosia/Experiments/Unleash/APNConsentOnLaunchExperiment.swift b/Ecosia/Experiments/Unleash/APNConsentOnLaunchExperiment.swift similarity index 81% rename from Client/Ecosia/Experiments/Unleash/APNConsentOnLaunchExperiment.swift rename to Ecosia/Experiments/Unleash/APNConsentOnLaunchExperiment.swift index 815c3b6a692c2..40099f0fcf74e 100644 --- a/Client/Ecosia/Experiments/Unleash/APNConsentOnLaunchExperiment.swift +++ b/Ecosia/Experiments/Unleash/APNConsentOnLaunchExperiment.swift @@ -4,12 +4,12 @@ import Foundation import Core -import Ecosia +import NotificationCenter -struct APNConsentOnLaunchExperiment { +public struct APNConsentOnLaunchExperiment { private init() {} - static var toggleName: Unleash.Toggle.Name { + public static var toggleName: Unleash.Toggle.Name { .apnConsentOnLaunch } @@ -18,7 +18,7 @@ struct APNConsentOnLaunchExperiment { Unleash.isEnabled(toggleName) && BrazeIntegrationExperiment.isEnabled } - static func requestAPNConsentIfNeeded(delegate: UNUserNotificationCenterDelegate) async { + public static func requestAPNConsentIfNeeded(delegate: UNUserNotificationCenterDelegate) async { guard isEnabled, BrazeService.shared.notificationAuthorizationStatus == .notDetermined else { return } diff --git a/Client/Ecosia/Experiments/Unleash/BrazeIntegrationExperiment.swift b/Ecosia/Experiments/Unleash/BrazeIntegrationExperiment.swift similarity index 100% rename from Client/Ecosia/Experiments/Unleash/BrazeIntegrationExperiment.swift rename to Ecosia/Experiments/Unleash/BrazeIntegrationExperiment.swift diff --git a/Client/Ecosia/Experiments/Unleash/NewsletterCardExperiment.swift b/Ecosia/Experiments/Unleash/NewsletterCardExperiment.swift similarity index 78% rename from Client/Ecosia/Experiments/Unleash/NewsletterCardExperiment.swift rename to Ecosia/Experiments/Unleash/NewsletterCardExperiment.swift index b464d9dc263b4..497f40026eaa9 100644 --- a/Client/Ecosia/Experiments/Unleash/NewsletterCardExperiment.swift +++ b/Ecosia/Experiments/Unleash/NewsletterCardExperiment.swift @@ -5,19 +5,19 @@ import Foundation import Core -struct NewsletterCardExperiment { +public struct NewsletterCardExperiment { private init() {} - static var isEnabled: Bool { + public static var isEnabled: Bool { Unleash.isEnabled(.newsletterCard) } - static var shouldShowCard: Bool { + public static var shouldShowCard: Bool { isEnabled && !isDismissed } /// Send onboarding card view analytics event, but just the first time it's called. - static func trackExperimentImpression() { + public static func trackExperimentImpression() { let trackExperimentImpressionKey = "newsletterCardExperimentImpression" guard !UserDefaults.standard.bool(forKey: trackExperimentImpressionKey) else { return @@ -29,16 +29,16 @@ struct NewsletterCardExperiment { // MARK: Dismissed private static let dismissedKey = "newsletterCardExperimentDismissed" - static var isDismissed: Bool { + public static var isDismissed: Bool { UserDefaults.standard.bool(forKey: dismissedKey) } - static func setDismissed() { + public static func setDismissed() { UserDefaults.standard.set(true, forKey: dismissedKey) } /// Should only be used in Debug! - static func unsetDismissed() { + public static func unsetDismissed() { UserDefaults.standard.removeObject(forKey: dismissedKey) } } diff --git a/Client/Ecosia/Experiments/Unleash/OnboardingRemoveExperiment.swift b/Ecosia/Experiments/Unleash/OnboardingRemoveExperiment.swift similarity index 86% rename from Client/Ecosia/Experiments/Unleash/OnboardingRemoveExperiment.swift rename to Ecosia/Experiments/Unleash/OnboardingRemoveExperiment.swift index 4a378aa9394ba..8d4bcdf167598 100644 --- a/Client/Ecosia/Experiments/Unleash/OnboardingRemoveExperiment.swift +++ b/Ecosia/Experiments/Unleash/OnboardingRemoveExperiment.swift @@ -5,7 +5,7 @@ import Foundation import Core -struct OnboardingRemoveExperiment { +public struct OnboardingRemoveExperiment { private init() {} @@ -22,7 +22,7 @@ struct OnboardingRemoveExperiment { Unleash.isEnabled(.onboardingRemove) } - static var shouldRemoveOnboarding: Bool { + public static var shouldRemoveOnboarding: Bool { isEnabled && variant != .control } } diff --git a/Client/Ecosia/Extensions/AppInfo+Ecosia.swift b/Ecosia/Extensions/AppInfo+Ecosia.swift similarity index 96% rename from Client/Ecosia/Extensions/AppInfo+Ecosia.swift rename to Ecosia/Extensions/AppInfo+Ecosia.swift index e699228c12857..d12dfe864db2d 100644 --- a/Client/Ecosia/Extensions/AppInfo+Ecosia.swift +++ b/Ecosia/Extensions/AppInfo+Ecosia.swift @@ -17,7 +17,7 @@ extension AppInfo { /// Only available for iOS 14.3 and later (will return nil on earlier versions). /// Returns nil after the first time, so that no unwanted new token is generated. /// If an error is caught, it will return nil and retry next time it is fetched. - static var adServicesAttributionToken: String? { + public static var adServicesAttributionToken: String? { guard #available(iOS 14.3, *), !UserDefaults.standard.bool(forKey: hasAttributedAppleSearchDownloadKey) else { return nil diff --git a/Client/Ecosia/Helpers/AppInfoProvider/AppVersionInfoProvider.swift b/Ecosia/Helpers/AppInfoProvider/AppVersionInfoProvider.swift similarity index 86% rename from Client/Ecosia/Helpers/AppInfoProvider/AppVersionInfoProvider.swift rename to Ecosia/Helpers/AppInfoProvider/AppVersionInfoProvider.swift index cf509602a293d..6158ef7f8e520 100644 --- a/Client/Ecosia/Helpers/AppInfoProvider/AppVersionInfoProvider.swift +++ b/Ecosia/Helpers/AppInfoProvider/AppVersionInfoProvider.swift @@ -4,6 +4,6 @@ import Foundation -protocol AppVersionInfoProvider { +public protocol AppVersionInfoProvider { var version: String { get } } diff --git a/Client/Ecosia/Helpers/AppInfoProvider/DefaultAppVersionInfoProvider.swift b/Ecosia/Helpers/AppInfoProvider/DefaultAppVersionInfoProvider.swift similarity index 68% rename from Client/Ecosia/Helpers/AppInfoProvider/DefaultAppVersionInfoProvider.swift rename to Ecosia/Helpers/AppInfoProvider/DefaultAppVersionInfoProvider.swift index 0fc4c91ed236f..4d2942ad1f220 100644 --- a/Client/Ecosia/Helpers/AppInfoProvider/DefaultAppVersionInfoProvider.swift +++ b/Ecosia/Helpers/AppInfoProvider/DefaultAppVersionInfoProvider.swift @@ -5,9 +5,11 @@ import Shared import Common -struct DefaultAppVersionInfoProvider: AppVersionInfoProvider { +public struct DefaultAppVersionInfoProvider: AppVersionInfoProvider { - var version: String { + public init() { } + + public var version: String { return AppInfo.ecosiaAppVersion } } diff --git a/Client/Ecosia/Helpers/EcosiaInstallType/EcosiaInstallType+Extensions.swift b/Ecosia/Helpers/EcosiaInstallType/EcosiaInstallType+Extensions.swift similarity index 90% rename from Client/Ecosia/Helpers/EcosiaInstallType/EcosiaInstallType+Extensions.swift rename to Ecosia/Helpers/EcosiaInstallType/EcosiaInstallType+Extensions.swift index 13dca5d22eda7..5a3480c898d1c 100644 --- a/Client/Ecosia/Helpers/EcosiaInstallType/EcosiaInstallType+Extensions.swift +++ b/Ecosia/Helpers/EcosiaInstallType/EcosiaInstallType+Extensions.swift @@ -17,7 +17,7 @@ extension EcosiaInstallType { /// /// - Warning: Ensure that `User.shared.firstTime` and `versionProvider.version` are correctly initialized before calling this function. /// - static func evaluateCurrentEcosiaInstallType(withVersionProvider versionProvider: AppVersionInfoProvider = DefaultAppVersionInfoProvider(), storeUpgradeVersion: Bool = false) { + public static func evaluateCurrentEcosiaInstallType(withVersionProvider versionProvider: AppVersionInfoProvider = DefaultAppVersionInfoProvider(), storeUpgradeVersion: Bool = false) { if User.shared.firstTime && EcosiaInstallType.get() == .unknown { diff --git a/Client/Ecosia/Helpers/EcosiaInstallType/EcosiaInstallType.swift b/Ecosia/Helpers/EcosiaInstallType/EcosiaInstallType.swift similarity index 93% rename from Client/Ecosia/Helpers/EcosiaInstallType/EcosiaInstallType.swift rename to Ecosia/Helpers/EcosiaInstallType/EcosiaInstallType.swift index 99ae657668e76..42c8732ce7fbc 100644 --- a/Client/Ecosia/Helpers/EcosiaInstallType/EcosiaInstallType.swift +++ b/Ecosia/Helpers/EcosiaInstallType/EcosiaInstallType.swift @@ -5,7 +5,7 @@ import Foundation /// Represents the type of Ecosia installation. -enum EcosiaInstallType: String { +public enum EcosiaInstallType: String { /// Represents a fresh installation of Ecosia. case fresh @@ -29,7 +29,7 @@ enum EcosiaInstallType: String { /// Retrieves the current Ecosia install type from UserDefaults. /// /// - Returns: The current Ecosia install type. If not found, returns `.unknown`. - static func get() -> EcosiaInstallType { + public static func get() -> EcosiaInstallType { guard let rawValue = UserDefaults.standard.string(forKey: Self.installTypeKey), let type = EcosiaInstallType(rawValue: rawValue) else { return unknown } @@ -47,7 +47,7 @@ enum EcosiaInstallType: String { /// Retrieves the persisted current version of Ecosia from UserDefaults. /// /// - Returns: The persisted current version. If not found, returns an empty string. - static func persistedCurrentVersion() -> String { + public static func persistedCurrentVersion() -> String { guard let currentVersion = UserDefaults.standard.string(forKey: Self.currentInstalledVersionKey) else { return "" } return currentVersion } diff --git a/Client/Ecosia/Helpers/Version/Version+Extensions.swift b/Ecosia/Helpers/Version/Version+Extensions.swift similarity index 100% rename from Client/Ecosia/Helpers/Version/Version+Extensions.swift rename to Ecosia/Helpers/Version/Version+Extensions.swift diff --git a/Client/Ecosia/Helpers/Version/Version.swift b/Ecosia/Helpers/Version/Version.swift similarity index 87% rename from Client/Ecosia/Helpers/Version/Version.swift rename to Ecosia/Helpers/Version/Version.swift index 622cde9cb1425..e8469bae0bbf0 100644 --- a/Client/Ecosia/Helpers/Version/Version.swift +++ b/Ecosia/Helpers/Version/Version.swift @@ -7,7 +7,7 @@ import Foundation /// Represents a semantic version of an app. /// /// A semantic version is typically represented as a series of numbers separated by dots, e.g., "1.0.0". -struct Version: CustomStringConvertible { +public struct Version: CustomStringConvertible { var major: Int var minor: Int @@ -16,7 +16,7 @@ struct Version: CustomStringConvertible { /// Initializes a new `Version` from a string representation. /// /// - Parameter versionString: A string containing the semantic version, e.g., "1.0.0". - init?(_ versionString: String) { + public init?(_ versionString: String) { let components = versionString.split(separator: ".") guard components.count == 3, let major = Int(components[0]), @@ -31,7 +31,7 @@ struct Version: CustomStringConvertible { } /// A string representation of the `Version`. - var description: String { + public var description: String { return "\(major).\(minor).\(patch)" } } @@ -45,7 +45,7 @@ extension Version: Comparable { /// - rhs: Another `Version`. /// /// - Returns: `true` if both instances represent the same version, `false` otherwise. - static func == (lhs: Version, rhs: Version) -> Bool { + public static func == (lhs: Version, rhs: Version) -> Bool { return lhs.major == rhs.major && lhs.minor == rhs.minor && lhs.patch == rhs.patch } @@ -56,7 +56,7 @@ extension Version: Comparable { /// - rhs: Another `Version`. /// /// - Returns: `true` if the instance on the left should come before the one on the right, `false` otherwise. - static func < (lhs: Version, rhs: Version) -> Bool { + public static func < (lhs: Version, rhs: Version) -> Bool { if lhs.major != rhs.major { return lhs.major < rhs.major } @@ -72,7 +72,7 @@ extension Version: Hashable { /// Adds this value to the given hasher. /// /// - Parameter hasher: The hasher to use when combining the components of this instance. - func hash(into hasher: inout Hasher) { + public func hash(into hasher: inout Hasher) { hasher.combine(major) hasher.combine(minor) hasher.combine(patch)