Skip to content

Commit

Permalink
Show VPN onboarding tips (#3429)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoreymendez authored Oct 28, 2024
1 parent c41048c commit dc67e00
Show file tree
Hide file tree
Showing 23 changed files with 812 additions and 35 deletions.
4 changes: 3 additions & 1 deletion Core/UserDefaultsPropertyWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ public struct UserDefaultsWrapper<T> {
case duckPlayerPixelExperimentLastDayPixelFired = "com.duckduckgo.ios.duckplayer.pixel.experiment.last.day.pixel.fired.v2"
case duckPlayerPixelExperimentLastVideoIDRendered = "com.duckduckgo.ios.duckplayer.pixel.experiment.last.videoID.rendered.v2"
case duckPlayerPixelExperimentOverride = "com.duckduckgo.ios.duckplayer.pixel.experiment.override.v2"


// TipKit
case resetTipKitOnNextLaunch = "com.duckduckgo.ios.tipKit.resetOnNextLaunch"
}

private let key: Key
Expand Down
52 changes: 52 additions & 0 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,17 @@
6FEC0B852C999352006B4F6E /* FavoriteItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FEC0B842C999352006B4F6E /* FavoriteItem.swift */; };
6FEC0B882C999961006B4F6E /* FavoritesListInteractingAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FEC0B872C999961006B4F6E /* FavoritesListInteractingAdapter.swift */; };
6FF915822B88E07A0042AC87 /* AdAttributionFetcherTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FF915802B88E0750042AC87 /* AdAttributionFetcherTests.swift */; };
7B1604E82CB685B400A44EC6 /* Logger+TipKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1604E72CB685B400A44EC6 /* Logger+TipKit.swift */; };
7B1604EC2CB68BDA00A44EC6 /* TipKitController+ConvenienceInitializers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1604EB2CB68BDA00A44EC6 /* TipKitController+ConvenienceInitializers.swift */; };
7B1604EE2CB68D2600A44EC6 /* TipKitDebugOptionsUIActionHandling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B1604ED2CB68D2600A44EC6 /* TipKitDebugOptionsUIActionHandling.swift */; };
7B8E0EC62CC81B4900B2B722 /* TipKitController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B8E0EC52CC81B4800B2B722 /* TipKitController.swift */; };
7BC571202BDBB877003B0CCE /* VPNActivationDateStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BC5711F2BDBB877003B0CCE /* VPNActivationDateStore.swift */; };
7BC571212BDBB977003B0CCE /* VPNActivationDateStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BC5711F2BDBB877003B0CCE /* VPNActivationDateStore.swift */; };
7BDBAD0E2CBFB3F1000379B7 /* VPN.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7BDBAD0D2CBFB3F1000379B7 /* VPN.xcassets */; };
7BF78E022CA2CC3E0026A1FC /* TipKitAppEventHandling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BF78E012CA2CC3E0026A1FC /* TipKitAppEventHandling.swift */; };
7BFD5FD52C9DA310000FF959 /* VPNAddWidgetTip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BFD5FD42C9DA310000FF959 /* VPNAddWidgetTip.swift */; };
7BFD5FD72C9DB9D7000FF959 /* VPNGeoswitchingTip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BFD5FD62C9DB9D7000FF959 /* VPNGeoswitchingTip.swift */; };
7BFD5FD92C9DBC24000FF959 /* VPNSnoozeTip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BFD5FD82C9DBC24000FF959 /* VPNSnoozeTip.swift */; };
83004E802193BB8200DA013C /* WKNavigationExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83004E7F2193BB8200DA013C /* WKNavigationExtension.swift */; };
83004E862193E5ED00DA013C /* TabViewControllerBrowsingMenuExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83004E852193E5ED00DA013C /* TabViewControllerBrowsingMenuExtension.swift */; };
83004E882193E8C700DA013C /* TabViewControllerLongPressMenuExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83004E872193E8C700DA013C /* TabViewControllerLongPressMenuExtension.swift */; };
Expand Down Expand Up @@ -1651,7 +1660,16 @@
6FEC0B842C999352006B4F6E /* FavoriteItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavoriteItem.swift; sourceTree = "<group>"; };
6FEC0B872C999961006B4F6E /* FavoritesListInteractingAdapter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavoritesListInteractingAdapter.swift; sourceTree = "<group>"; };
6FF915802B88E0750042AC87 /* AdAttributionFetcherTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdAttributionFetcherTests.swift; sourceTree = "<group>"; };
7B1604E72CB685B400A44EC6 /* Logger+TipKit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Logger+TipKit.swift"; sourceTree = "<group>"; };
7B1604EB2CB68BDA00A44EC6 /* TipKitController+ConvenienceInitializers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "TipKitController+ConvenienceInitializers.swift"; sourceTree = "<group>"; };
7B1604ED2CB68D2600A44EC6 /* TipKitDebugOptionsUIActionHandling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TipKitDebugOptionsUIActionHandling.swift; sourceTree = "<group>"; };
7B8E0EC52CC81B4800B2B722 /* TipKitController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TipKitController.swift; sourceTree = "<group>"; };
7BC5711F2BDBB877003B0CCE /* VPNActivationDateStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VPNActivationDateStore.swift; sourceTree = "<group>"; };
7BDBAD0D2CBFB3F1000379B7 /* VPN.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = VPN.xcassets; sourceTree = "<group>"; };
7BF78E012CA2CC3E0026A1FC /* TipKitAppEventHandling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TipKitAppEventHandling.swift; sourceTree = "<group>"; };
7BFD5FD42C9DA310000FF959 /* VPNAddWidgetTip.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPNAddWidgetTip.swift; sourceTree = "<group>"; };
7BFD5FD62C9DB9D7000FF959 /* VPNGeoswitchingTip.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPNGeoswitchingTip.swift; sourceTree = "<group>"; };
7BFD5FD82C9DBC24000FF959 /* VPNSnoozeTip.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPNSnoozeTip.swift; sourceTree = "<group>"; };
83004E7F2193BB8200DA013C /* WKNavigationExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WKNavigationExtension.swift; sourceTree = "<group>"; };
83004E832193E14C00DA013C /* UIAlertControllerExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = UIAlertControllerExtension.swift; path = ../Core/UIAlertControllerExtension.swift; sourceTree = "<group>"; };
83004E852193E5ED00DA013C /* TabViewControllerBrowsingMenuExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabViewControllerBrowsingMenuExtension.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3728,6 +3746,7 @@
children = (
4B37E04F2B928CA6009E81CA /* vpn-light-mode.json */,
4B6ED9442B992FE4007F5CAA /* vpn-dark-mode.json */,
7BDBAD0D2CBFB3F1000379B7 /* VPN.xcassets */,
);
name = Resources;
sourceTree = "<group>";
Expand Down Expand Up @@ -4011,6 +4030,28 @@
name = AdAttribution;
sourceTree = "<group>";
};
7BF78E002CA2CC100026A1FC /* TipKit */ = {
isa = PBXGroup;
children = (
7B1604E72CB685B400A44EC6 /* Logger+TipKit.swift */,
7BF78E012CA2CC3E0026A1FC /* TipKitAppEventHandling.swift */,
7B8E0EC52CC81B4800B2B722 /* TipKitController.swift */,
7B1604EB2CB68BDA00A44EC6 /* TipKitController+ConvenienceInitializers.swift */,
7B1604ED2CB68D2600A44EC6 /* TipKitDebugOptionsUIActionHandling.swift */,
);
path = TipKit;
sourceTree = "<group>";
};
7BFD5FD32C9DA235000FF959 /* TipKit */ = {
isa = PBXGroup;
children = (
7BFD5FD42C9DA310000FF959 /* VPNAddWidgetTip.swift */,
7BFD5FD62C9DB9D7000FF959 /* VPNGeoswitchingTip.swift */,
7BFD5FD82C9DBC24000FF959 /* VPNSnoozeTip.swift */,
);
name = TipKit;
sourceTree = "<group>";
};
830FA79B1F8E81FB00FCE105 /* ContentBlocker */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -4238,6 +4279,7 @@
F13B4BF41F18C74500814661 /* Tabs */,
F1386BA21E6846320062FC3C /* TabSwitcher */,
98F3A1D6217B36EE0011A0D4 /* Themes */,
7BF78E002CA2CC100026A1FC /* TipKit */,
F11CEF581EBB66C80088E4D7 /* Tutorials */,
CB48D32F2B90CE8500631D8B /* UserBehaviorMonitor */,
F1D796ED1E7AE4090019D451 /* UserInterface */,
Expand Down Expand Up @@ -5551,6 +5593,7 @@
EECD94B22A28B8580085C66E /* NetworkProtection */ = {
isa = PBXGroup;
children = (
7BFD5FD32C9DA235000FF959 /* TipKit */,
4BD96E072C4DCCD1003BC32C /* LiveActivity */,
4B37E04E2B928C91009E81CA /* Resources */,
EE01EB412AFC1DE10096AAC9 /* PreferredLocation */,
Expand Down Expand Up @@ -6957,6 +7000,7 @@
85F98F98296F4CB100742F4A /* SyncAssets.xcassets in Resources */,
31BC5F412C2B0B540004DF37 /* DuckPlayer.xcassets in Resources */,
AA4D6A9423DE49A5007E8790 /* [email protected] in Resources */,
7BDBAD0E2CBFB3F1000379B7 /* VPN.xcassets in Resources */,
98B001B3251EABB40090EC07 /* InfoPlist.strings in Resources */,
AA4D6ACE23DE4D27007E8790 /* [email protected] in Resources */,
D65CEA702B6AC6C9008A759B /* Subscription.xcassets in Resources */,
Expand Down Expand Up @@ -7340,9 +7384,12 @@
EE4FB1882A28D11900E5CBA7 /* NetworkProtectionStatusViewModel.swift in Sources */,
6FB1FE9E2C24D41D0075B68B /* NewTabPageSectionsDebugView.swift in Sources */,
8540BD5623D9E9C20057FDD2 /* PreserveLoginsSettingsViewController.swift in Sources */,
7B8E0EC62CC81B4900B2B722 /* TipKitController.swift in Sources */,
7B1604EC2CB68BDA00A44EC6 /* TipKitController+ConvenienceInitializers.swift in Sources */,
851672D12BED1FC900592F24 /* AutocompleteView.swift in Sources */,
3161D13227AC161B00285CF6 /* DownloadMetadata.swift in Sources */,
D664C7C72B289AA200CBFA76 /* PurchaseInProgressView.swift in Sources */,
7BFD5FD72C9DB9D7000FF959 /* VPNGeoswitchingTip.swift in Sources */,
F1668BCE1E798081008CBA04 /* BookmarksViewController.swift in Sources */,
8590CB69268A4E190089F6BF /* DebugEtagStorage.swift in Sources */,
C1CDA3162AFB9C7F006D1476 /* AutofillNeverPromptWebsitesManager.swift in Sources */,
Expand Down Expand Up @@ -7415,6 +7462,7 @@
9F5E5AB02C3E4C6000165F54 /* ContextualOnboardingPresenter.swift in Sources */,
310D091B2799F54900DC0060 /* DownloadManager.swift in Sources */,
98D98A7425ED88D100D8E3DF /* BrowsingMenuEntryViewCell.swift in Sources */,
7BFD5FD92C9DBC24000FF959 /* VPNSnoozeTip.swift in Sources */,
98F3A1D8217B37010011A0D4 /* Theme.swift in Sources */,
4B2C79612C5B27AC00A240CC /* VPNSnoozeActivityAttributes.swift in Sources */,
CB9B873C278C8FEA001F4906 /* WidgetEducationView.swift in Sources */,
Expand Down Expand Up @@ -7516,6 +7564,7 @@
3157B43827F4C8490042D3D7 /* FaviconsHelper.swift in Sources */,
85F200042216F5D8006BB258 /* FindInPageView.swift in Sources */,
D652498E2B515A6A0056B0DE /* SubscriptionSettingsViewModel.swift in Sources */,
7B1604E82CB685B400A44EC6 /* Logger+TipKit.swift in Sources */,
8548D95E25262B1B005AAE49 /* ViewHighlighter.swift in Sources */,
F4D7221026F29A70007D6193 /* BookmarkDetailsCell.swift in Sources */,
F1617C131E572E0300DEDCAF /* TabSwitcherViewController.swift in Sources */,
Expand All @@ -7528,6 +7577,7 @@
D63FF8982C1B6A45006DE24D /* DuckPlayer.swift in Sources */,
85B9CB8921AEBDD5009001F1 /* FavoriteHomeCell.swift in Sources */,
C1935A102C88D131001AD72D /* AutofillSurveyManager.swift in Sources */,
7B1604EE2CB68D2600A44EC6 /* TipKitDebugOptionsUIActionHandling.swift in Sources */,
98999D5922FDA41500CBBE1B /* BasicAuthenticationAlert.swift in Sources */,
C13B32D22A0E750700A59236 /* AutofillSettingStatus.swift in Sources */,
1DDF40202BA049FA006850D9 /* SettingsRootView.swift in Sources */,
Expand Down Expand Up @@ -7671,6 +7721,7 @@
31CC224928369B38001654A4 /* AutofillLoginSettingsListViewController.swift in Sources */,
F1D796EC1E7AB8930019D451 /* SaveBookmarkActivity.swift in Sources */,
F4B0B78C252CAFF700830156 /* OnboardingWidgetsViewController.swift in Sources */,
7BFD5FD52C9DA310000FF959 /* VPNAddWidgetTip.swift in Sources */,
C17B595A2A03AAD30055F2D1 /* PasswordGenerationPromptViewController.swift in Sources */,
8531A08E1F9950E6000484F0 /* UnprotectedSitesViewController.swift in Sources */,
CBD4F13C279EBF4A00B20FD7 /* HomeMessage.swift in Sources */,
Expand Down Expand Up @@ -7818,6 +7869,7 @@
F15D43201E706CC500BF2CDC /* AutocompleteViewController.swift in Sources */,
BD862E092B30F63E0073E2EE /* VPNMetadataCollector.swift in Sources */,
D6E83C682B23B6A3006C8AFB /* FontSettings.swift in Sources */,
7BF78E022CA2CC3E0026A1FC /* TipKitAppEventHandling.swift in Sources */,
1DEAADF62BA4809400E25A97 /* CookiePopUpProtectionView.swift in Sources */,
31EF52E1281B3BDC0034796E /* AutofillLoginListItemViewModel.swift in Sources */,
C1EA86602C74CB6C00E8604D /* SyncPromoView.swift in Sources */,
Expand Down
6 changes: 6 additions & 0 deletions DuckDuckGo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ import os.log
private(set) var subscriptionFeatureAvailability: SubscriptionFeatureAvailability!
var privacyProDataReporter: PrivacyProDataReporting!

// MARK: - Feature specific app event handlers

private let tipKitAppEventsHandler = TipKitAppEventHandler()

// MARK: lifecycle

@UserDefaultsWrapper(key: .privacyConfigCustomURL, defaultValue: nil)
Expand Down Expand Up @@ -394,6 +398,8 @@ import os.log
didCrashDuringCrashHandlersSetUp = false
}

tipKitAppEventsHandler.appDidFinishLaunching()

return true
}

Expand Down
Loading

0 comments on commit dc67e00

Please sign in to comment.