From 8b30236a74bfea45ea90331710a6621c2c88e846 Mon Sep 17 00:00:00 2001 From: Michal Smaga Date: Mon, 22 Jul 2024 16:04:25 +0200 Subject: [PATCH] Allow activating subscription for internal users via debug menu (#3117) Task/Issue URL: https://app.asana.com/0/72649045549333/1207811184536020/f Description: Add to debug menu option to start the subscription activation flow. This option is to allow access to the flow even when the purchase is disallowed in given region (App Store build for non-US user). Additional changes are renaming and cleanup of obsolete items in the "Subscription" debug menu. --- DuckDuckGo.xcodeproj/project.pbxproj | 4 + DuckDuckGo/Debug.storyboard | 2 +- DuckDuckGo/MainViewController+Segues.swift | 8 ++ DuckDuckGo/SettingsRootView.swift | 11 +++ DuckDuckGo/SettingsViewModel.swift | 2 + .../SubscriptionDebugViewController.swift | 87 +++++++++++-------- .../UINavigationControllerExtension.swift | 45 ++++++++++ 7 files changed, 122 insertions(+), 37 deletions(-) create mode 100644 DuckDuckGo/UINavigationControllerExtension.swift diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index fdf25c9c95..1812c37a6c 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -88,6 +88,7 @@ 1E908BF129827C480008C8F3 /* AutoconsentUserScript.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E908BEE29827C480008C8F3 /* AutoconsentUserScript.swift */; }; 1E908BF229827C480008C8F3 /* autoconsent-bundle.js in Resources */ = {isa = PBXBuildFile; fileRef = 1E908BEF29827C480008C8F3 /* autoconsent-bundle.js */; }; 1E908BF329827C480008C8F3 /* AutoconsentManagement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E908BF029827C480008C8F3 /* AutoconsentManagement.swift */; }; + 1E9529A12C4E748B006E80D4 /* UINavigationControllerExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E9529A02C4E748B006E80D4 /* UINavigationControllerExtension.swift */; }; 1EA51376286596A000493C6A /* PrivacyIconLogic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EA51375286596A000493C6A /* PrivacyIconLogic.swift */; }; 1EA513782866039400493C6A /* TrackerAnimationLogic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EA513772866039400493C6A /* TrackerAnimationLogic.swift */; }; 1EC458462948932500CB2B13 /* UIHostingControllerExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EC458452948932500CB2B13 /* UIHostingControllerExtension.swift */; }; @@ -1247,6 +1248,7 @@ 1E908BEE29827C480008C8F3 /* AutoconsentUserScript.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutoconsentUserScript.swift; sourceTree = ""; }; 1E908BEF29827C480008C8F3 /* autoconsent-bundle.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "autoconsent-bundle.js"; sourceTree = ""; }; 1E908BF029827C480008C8F3 /* AutoconsentManagement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutoconsentManagement.swift; sourceTree = ""; }; + 1E9529A02C4E748B006E80D4 /* UINavigationControllerExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UINavigationControllerExtension.swift; sourceTree = ""; }; 1EA51375286596A000493C6A /* PrivacyIconLogic.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrivacyIconLogic.swift; sourceTree = ""; }; 1EA513772866039400493C6A /* TrackerAnimationLogic.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrackerAnimationLogic.swift; sourceTree = ""; }; 1EC458452948932500CB2B13 /* UIHostingControllerExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIHostingControllerExtension.swift; sourceTree = ""; }; @@ -5678,6 +5680,7 @@ 319A37162829C8AD0079FBCE /* UITableViewExtension.swift */, 854A01322A558B3A00FCC628 /* UIView+Constraints.swift */, F143C32C1E4A9A4800CFDE3A /* UIViewControllerExtension.swift */, + 1E9529A02C4E748B006E80D4 /* UINavigationControllerExtension.swift */, F1DE78591E5CD2A70058895A /* UIViewExtension.swift */, F1F5337B1F26A9EF00D80D4F /* UserText.swift */, 4BBBBA912B03291700D965DA /* VPNWaitlistUserText.swift */, @@ -6855,6 +6858,7 @@ 1E8AD1D127C000AB00ABA377 /* OngoingDownloadRow.swift in Sources */, 1DEAADF02BA46E0700E25A97 /* PrivateSearchView.swift in Sources */, 85058366219AE9EA00ED4EDB /* HomePageConfiguration.swift in Sources */, + 1E9529A12C4E748B006E80D4 /* UINavigationControllerExtension.swift in Sources */, EE0153E12A6EABE0002A8B26 /* NetworkProtectionConvenienceInitialisers.swift in Sources */, C17B595B2A03AAD30055F2D1 /* PasswordGenerationPromptView.swift in Sources */, 98AA92B32456FBE100ED4B9E /* SearchFieldContainerView.swift in Sources */, diff --git a/DuckDuckGo/Debug.storyboard b/DuckDuckGo/Debug.storyboard index 46d581edff..9d6e3255c3 100644 --- a/DuckDuckGo/Debug.storyboard +++ b/DuckDuckGo/Debug.storyboard @@ -220,7 +220,7 @@ -