From ccfb604d58bdcb3a3196b59b192d2d8928552a63 Mon Sep 17 00:00:00 2001 From: Aliaksandr Dvoineu Date: Tue, 16 May 2023 06:20:10 +0300 Subject: [PATCH] added new curated lists, some changes in access levels --- .../icn_configuration.imageset/Contents.json | 15 ++ .../icn_configuration.pdf | 172 ++++++++++++++++++ ClientModels.swift | 1 - LockdowniOS.xcodeproj/project.pbxproj | 76 ++++++-- LockdowniOS/AdvancedPaywallView.swift | 14 +- LockdowniOS/AnonymousPaywallView.swift | 35 +++- LockdowniOS/AppDelegate.swift | 73 ++++---- LockdowniOS/Base.lproj/Main.storyboard | 42 ++--- LockdowniOS/BlockListViewController.swift | 11 +- LockdowniOS/BlockLogViewController.swift | 63 ++++--- .../FirewallPaywallViewController.swift | 18 +- .../LDConfigurationViewController.swift | 9 +- LockdowniOS/LDFirewallViewController.swift | 88 +++++++-- LockdowniOS/LDVpnViewController.swift | 80 +++++++- LockdowniOS/ListSettingsViewController.swift | 7 +- LockdowniOS/OverallStatiscticView.swift | 10 +- LockdowniOS/SplashscreenViewController.swift | 53 ++++++ LockdowniOS/UniversalPaywallView.swift | 6 +- LockdowniOS/UserService.swift | 2 +- LockdowniOS/VPNPaywallViewController.swift | 38 +++- LockdowniOS/VPNSubscription.swift | 35 ++-- 21 files changed, 664 insertions(+), 184 deletions(-) create mode 100644 Assets.xcassets/icn_configuration.imageset/Contents.json create mode 100644 Assets.xcassets/icn_configuration.imageset/icn_configuration.pdf create mode 100644 LockdowniOS/SplashscreenViewController.swift diff --git a/Assets.xcassets/icn_configuration.imageset/Contents.json b/Assets.xcassets/icn_configuration.imageset/Contents.json new file mode 100644 index 0000000..be0da65 --- /dev/null +++ b/Assets.xcassets/icn_configuration.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "icn_configuration.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/Assets.xcassets/icn_configuration.imageset/icn_configuration.pdf b/Assets.xcassets/icn_configuration.imageset/icn_configuration.pdf new file mode 100644 index 0000000..ba7b23b --- /dev/null +++ b/Assets.xcassets/icn_configuration.imageset/icn_configuration.pdf @@ -0,0 +1,172 @@ +%PDF-1.7 + +1 0 obj + << >> +endobj + +2 0 obj + << /Length 3 0 R >> +stream +/DeviceRGB CS +/DeviceRGB cs +q +1.000000 0.000000 -0.000000 1.000000 0.000000 -0.214111 cm +0.600000 0.600000 0.600000 scn +20.904484 17.394764 m +21.368065 16.592863 21.722446 15.759195 21.973381 14.909565 c +21.433344 14.598686 20.978598 14.157190 20.651653 13.624325 c +20.290869 13.036301 20.099773 12.359935 20.099514 11.670049 c +20.099258 10.980165 20.289845 10.303655 20.650192 9.715361 c +20.976801 9.182152 21.431324 8.740247 21.971262 8.428954 c +21.458757 6.686216 20.538595 5.090506 19.286978 3.773979 c +18.747540 4.086189 18.137623 4.259148 17.512524 4.275661 c +16.822748 4.293884 16.141378 4.120907 15.543825 3.775871 c +14.946270 3.430836 14.455830 2.927195 14.126781 2.320692 c +13.828584 1.771051 13.673470 1.156351 13.674195 0.533077 c +11.908100 0.107105 10.065874 0.107859 8.300127 0.535276 c +8.300602 1.158606 8.145217 1.773291 7.846751 2.322845 c +7.517449 2.929176 7.026816 3.432585 6.429144 3.777355 c +5.831472 4.122126 5.150065 4.294821 4.460328 4.276327 c +3.835356 4.259571 3.225625 4.086439 2.686388 3.774130 c +2.063773 4.430382 1.520800 5.158125 1.068913 5.942282 c +0.866418 5.825590 l +1.068737 5.942587 l +0.615622 6.726147 0.256930 7.560382 0.000000 8.427838 c +0.539972 8.738712 0.994669 9.180180 1.321584 9.712997 c +1.682371 10.301023 1.873464 10.977389 1.873722 11.667274 c +1.873980 12.357158 1.683393 13.033669 1.323046 13.621963 c +0.996439 14.155172 0.541912 14.597075 0.001975 14.908367 c +0.514479 16.651108 1.434644 18.246819 2.686261 19.563347 c +3.225698 19.251135 3.835614 19.078176 4.460714 19.061663 c +5.150490 19.043438 5.831858 19.216417 6.429413 19.561453 c +7.026968 19.906490 7.517408 20.410130 7.846457 21.016634 c +8.144655 21.566275 8.299768 22.180973 8.299045 22.804247 c +10.065140 23.230219 11.907364 23.229465 13.673112 22.802046 c +13.672637 22.178719 13.828022 21.564032 14.126487 21.014477 c +14.455789 20.408144 14.946423 19.904739 15.544095 19.559969 c +16.141766 19.215199 16.823172 19.042503 17.512909 19.060997 c +18.137920 19.077755 18.747690 19.250910 19.286953 19.563255 c +19.897404 18.920540 20.441837 18.196901 20.904369 17.394966 c +20.904484 17.394764 l +h +7.363808 5.394186 m +7.363998 5.394075 l +8.559423 4.704582 9.458236 3.598047 9.888060 2.286676 c +9.935762 2.141140 l +10.088241 2.126778 l +10.685646 2.070509 11.285800 2.069283 11.883828 2.125608 c +12.036282 2.139971 l +12.083998 2.285475 l +12.514101 3.597029 13.413335 4.703590 14.609183 5.392872 c +14.609514 5.393064 l +15.804481 6.084450 17.212688 6.310163 18.563877 6.026884 c +18.713669 5.995481 l +18.802338 6.120228 l +19.149935 6.609261 19.449434 7.130437 19.698524 7.675325 c +19.762119 7.814435 l +19.660093 7.928395 l +18.739574 8.956595 18.231045 10.288438 18.232035 11.668493 c +18.232035 11.668661 l +18.232035 13.082383 18.759258 14.402637 19.660101 15.408935 c +19.762426 15.523241 l +19.698254 15.662592 l +19.447437 16.207222 19.146814 16.727501 18.800220 17.216789 c +18.711601 17.341892 l +18.561550 17.310440 l +17.211214 17.027399 15.803920 17.252693 14.609429 17.943138 c +14.609241 17.943249 l +13.413815 18.632742 12.515003 19.739279 12.085179 21.050650 c +12.037477 21.196184 l +11.884998 21.210546 l +11.287594 21.266815 10.687437 21.268042 10.089409 21.211716 c +9.936955 21.197355 l +9.889239 21.051851 l +9.459136 19.740295 8.559904 18.633734 7.364056 17.944450 c +7.363724 17.944260 l +6.168757 17.252874 4.760549 17.027161 3.409360 17.310438 c +3.259362 17.341885 l +3.170729 17.216858 l +2.824025 16.727785 2.524039 16.207218 2.274725 15.662024 c +2.211105 15.522903 l +2.313144 15.408928 l +3.233665 14.380727 3.742193 13.048885 3.741202 11.668830 c +3.741202 11.668661 l +3.741202 10.254938 3.213981 8.934685 2.313138 7.928389 c +2.210811 7.814082 l +2.274985 7.674731 l +2.525801 7.130102 2.826425 6.609823 3.173019 6.120535 c +3.261637 5.995432 l +3.411688 6.026882 l +4.762024 6.309925 6.169318 6.084631 7.363808 5.394186 c +h +10.986620 8.396538 m +10.118798 8.396538 9.286520 8.741278 8.672877 9.354920 c +8.059236 9.968562 7.714495 10.800840 7.714495 11.668661 c +7.714495 12.536483 8.059236 13.368759 8.672877 13.982402 c +9.286520 14.596045 10.118798 14.940784 10.986620 14.940784 c +11.854441 14.940784 12.686719 14.596045 13.300361 13.982402 c +13.914002 13.368759 14.258743 12.536483 14.258743 11.668661 c +14.258743 10.800840 13.914002 9.968562 13.300361 9.354920 c +12.686719 8.741278 11.854441 8.396538 10.986620 8.396538 c +h +10.986620 10.266323 m +11.358543 10.266323 11.715232 10.414069 11.978221 10.677058 c +12.241210 10.940047 12.388958 11.296738 12.388958 11.668661 c +12.388958 12.040586 12.241210 12.397275 11.978221 12.660264 c +11.715232 12.923253 11.358543 13.071000 10.986620 13.071000 c +10.614696 13.071000 10.258004 12.923253 9.995015 12.660264 c +9.732025 12.397274 9.584281 12.040584 9.584281 11.668661 c +9.584281 11.296739 9.732025 10.940048 9.995015 10.677058 c +10.258004 10.414069 10.614696 10.266323 10.986620 10.266323 c +h +f* +n +Q + +endstream +endobj + +3 0 obj + 4844 +endobj + +4 0 obj + << /Annots [] + /Type /Page + /MediaBox [ 0.000000 0.000000 21.973389 22.909058 ] + /Resources 1 0 R + /Contents 2 0 R + /Parent 5 0 R + >> +endobj + +5 0 obj + << /Kids [ 4 0 R ] + /Count 1 + /Type /Pages + >> +endobj + +6 0 obj + << /Pages 5 0 R + /Type /Catalog + >> +endobj + +xref +0 7 +0000000000 65535 f +0000000010 00000 n +0000000034 00000 n +0000004934 00000 n +0000004957 00000 n +0000005130 00000 n +0000005204 00000 n +trailer +<< /ID [ (some) (id) ] + /Root 6 0 R + /Size 7 +>> +startxref +5263 +%%EOF \ No newline at end of file diff --git a/ClientModels.swift b/ClientModels.swift index 0207937..7884d52 100644 --- a/ClientModels.swift +++ b/ClientModels.swift @@ -89,4 +89,3 @@ public extension RawValueCodable where RawValue: Codable { try container.encode(rawValue) } } - diff --git a/LockdowniOS.xcodeproj/project.pbxproj b/LockdowniOS.xcodeproj/project.pbxproj index a303cda..a006846 100644 --- a/LockdowniOS.xcodeproj/project.pbxproj +++ b/LockdowniOS.xcodeproj/project.pbxproj @@ -261,6 +261,13 @@ 40960B0D2A034054000F82EB /* LockdownStorageIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40960B0C2A034054000F82EB /* LockdownStorageIdentifier.swift */; }; 40960B0E2A034054000F82EB /* LockdownStorageIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40960B0C2A034054000F82EB /* LockdownStorageIdentifier.swift */; }; 40960B152A034400000F82EB /* Keychainable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40960B142A034400000F82EB /* Keychainable.swift */; }; + 40E7A2F22A0CE8AE00E0231A /* advanced_gaming.txt in Resources */ = {isa = PBXBuildFile; fileRef = 40E7A2EC2A0CE8AE00E0231A /* advanced_gaming.txt */; }; + 40E7A2F82A0CE92900E0231A /* ifunny_trackers.txt in Resources */ = {isa = PBXBuildFile; fileRef = 40E7A2F32A0CE92800E0231A /* ifunny_trackers.txt */; }; + 40E7A2F92A0CE92900E0231A /* junes_journey_trackers.txt in Resources */ = {isa = PBXBuildFile; fileRef = 40E7A2F42A0CE92800E0231A /* junes_journey_trackers.txt */; }; + 40E7A2FA2A0CE92900E0231A /* scams.txt in Resources */ = {isa = PBXBuildFile; fileRef = 40E7A2F52A0CE92800E0231A /* scams.txt */; }; + 40E7A2FB2A0CE92900E0231A /* tiktok_trackers.txt in Resources */ = {isa = PBXBuildFile; fileRef = 40E7A2F62A0CE92800E0231A /* tiktok_trackers.txt */; }; + 40E7A2FC2A0CE92900E0231A /* advanced_analytics.txt in Resources */ = {isa = PBXBuildFile; fileRef = 40E7A2F72A0CE92900E0231A /* advanced_analytics.txt */; }; + 40E7A3012A0E1C7A00E0231A /* SplashscreenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40E7A3002A0E1C7A00E0231A /* SplashscreenViewController.swift */; }; 40FC414329F74C7900BD7396 /* String+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40FC414229F74C7900BD7396 /* String+Extensions.swift */; }; 4A86219093026DE70A097E79 /* Pods-LockdownTests-metadata.plist in Resources */ = {isa = PBXBuildFile; fileRef = 8DA68459884385F76BF86234 /* Pods-LockdownTests-metadata.plist */; }; 54F0B1A0273200B0002F3630 /* FirewallController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DCA4F4022F252720017740D /* FirewallController.swift */; }; @@ -711,6 +718,13 @@ 40960B092A03400E000F82EB /* UserDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefault.swift; sourceTree = ""; }; 40960B0C2A034054000F82EB /* LockdownStorageIdentifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LockdownStorageIdentifier.swift; sourceTree = ""; }; 40960B142A034400000F82EB /* Keychainable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Keychainable.swift; sourceTree = ""; }; + 40E7A2EC2A0CE8AE00E0231A /* advanced_gaming.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = advanced_gaming.txt; sourceTree = ""; }; + 40E7A2F32A0CE92800E0231A /* ifunny_trackers.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ifunny_trackers.txt; sourceTree = ""; }; + 40E7A2F42A0CE92800E0231A /* junes_journey_trackers.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = junes_journey_trackers.txt; sourceTree = ""; }; + 40E7A2F52A0CE92800E0231A /* scams.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = scams.txt; sourceTree = ""; }; + 40E7A2F62A0CE92800E0231A /* tiktok_trackers.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tiktok_trackers.txt; sourceTree = ""; }; + 40E7A2F72A0CE92900E0231A /* advanced_analytics.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = advanced_analytics.txt; sourceTree = ""; }; + 40E7A3002A0E1C7A00E0231A /* SplashscreenViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashscreenViewController.swift; sourceTree = ""; }; 40FC414229F74C7900BD7396 /* String+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extensions.swift"; sourceTree = ""; }; 4CA426CE326B009F3E4493D1 /* Pods_Lockdown.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Lockdown.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 50F9BE503587CE4933CB7983 /* Pods-Lockdown-settings-metadata.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = "Pods-Lockdown-settings-metadata.plist"; path = "Settings.bundle/Pods-Lockdown-settings-metadata.plist"; sourceTree = ""; }; @@ -977,6 +991,12 @@ 3D0971D522EBAAEE00CCD326 /* Domains */ = { isa = PBXGroup; children = ( + 40E7A2F72A0CE92900E0231A /* advanced_analytics.txt */, + 40E7A2F32A0CE92800E0231A /* ifunny_trackers.txt */, + 40E7A2F42A0CE92800E0231A /* junes_journey_trackers.txt */, + 40E7A2F52A0CE92800E0231A /* scams.txt */, + 40E7A2F62A0CE92800E0231A /* tiktok_trackers.txt */, + 40E7A2EC2A0CE8AE00E0231A /* advanced_gaming.txt */, 3DD545DA2808C2F6005E140C /* 5000_dummy_list.txt */, 3DAA6B4E22EA76420018FC09 /* clickbait.txt */, 3D5F5A0723107C1E004C3860 /* game_ads.txt */, @@ -1512,6 +1532,30 @@ name = Protocols; sourceTree = ""; }; + 40E7A2FD2A0E1C3200E0231A /* Presentation */ = { + isa = PBXGroup; + children = ( + 40E7A2FE2A0E1C4500E0231A /* Splashscreen */, + ); + name = Presentation; + sourceTree = ""; + }; + 40E7A2FE2A0E1C4500E0231A /* Splashscreen */ = { + isa = PBXGroup; + children = ( + 40E7A2FF2A0E1C5600E0231A /* ViewController */, + ); + name = Splashscreen; + sourceTree = ""; + }; + 40E7A2FF2A0E1C5600E0231A /* ViewController */ = { + isa = PBXGroup; + children = ( + 40E7A3002A0E1C7A00E0231A /* SplashscreenViewController.swift */, + ); + name = ViewController; + sourceTree = ""; + }; 7C0D11102473EDFD00A26E04 /* Services */ = { isa = PBXGroup; children = ( @@ -1650,6 +1694,7 @@ A1141A131F46230500F54698 /* LockdowniOS */ = { isa = PBXGroup; children = ( + 40E7A2FD2A0E1C3200E0231A /* Presentation */, 40960B042A033EE8000F82EB /* Core */, 40960AF92A033E2E000F82EB /* Business Logic */, 402D24CE29D87EF300A5AB60 /* Scenes */, @@ -2245,6 +2290,7 @@ A1D85F0B207C562F00B766E0 /* adBlockListThree.json in Resources */, A1159FCC207C228300DA4670 /* privacyBlockList.json in Resources */, A1159FCD207C228300DA4670 /* socialBlockList.json in Resources */, + 40E7A2F22A0CE8AE00E0231A /* advanced_gaming.txt in Resources */, A1FCDA8722CDE8C000C928BC /* crypto_mining_ips.txt in Resources */, 3D752C342357FA3B00C163E4 /* SF-Pro-Rounded-Regular.otf in Resources */, A1159FCE207C228300DA4670 /* adBlockList.json in Resources */, @@ -2254,6 +2300,7 @@ 3D44378422DFB22600908CDC /* Montserrat-SemiBold.ttf in Resources */, 3D01D97B2480DCB3003A710C /* data_trackers.txt in Resources */, 3D44378022DFB22600908CDC /* Montserrat-Medium.ttf in Resources */, + 40E7A2F82A0CE92900E0231A /* ifunny_trackers.txt in Resources */, A15F3C751F79DC8F00B07F03 /* LaunchScreen.storyboard in Resources */, 3DD545DB2808C2F6005E140C /* 5000_dummy_list.txt in Resources */, A1FCDA8522CDE60800C928BC /* crypto_mining.txt in Resources */, @@ -2268,8 +2315,10 @@ 3D752C362357FA3B00C163E4 /* SF-Pro-Rounded-Bold.otf in Resources */, 3D44378222DFB22600908CDC /* Montserrat-Thin.ttf in Resources */, A1FCDA8A22D3BA1900C928BC /* facebook_inc_ips.txt in Resources */, + 40E7A2F92A0CE92900E0231A /* junes_journey_trackers.txt in Resources */, 3DAA6B4F22EA76420018FC09 /* clickbait.txt in Resources */, A1FCDA8D22D3C50A00C928BC /* email_opens.txt in Resources */, + 40E7A2FB2A0CE92900E0231A /* tiktok_trackers.txt in Resources */, A1141A1C1F46230500F54698 /* Assets.xcassets in Resources */, 3D44378322DFB22600908CDC /* Montserrat-Bold.ttf in Resources */, A1FCDA9122D3D52C00C928BC /* facebook_inc_ipv6.txt in Resources */, @@ -2282,6 +2331,8 @@ 3D40826327F675F6004C146B /* dnscrypt-proxy.toml in Resources */, 3D5464D323037CCA00AE1F73 /* Settings.bundle in Resources */, 20816D1FD569053C0994232B /* Pods-Lockdown-metadata.plist in Resources */, + 40E7A2FC2A0CE92900E0231A /* advanced_analytics.txt in Resources */, + 40E7A2FA2A0CE92900E0231A /* scams.txt in Resources */, C9E66BB880A29A48D055FBFF /* Pods-Lockdown-settings-metadata.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -2683,6 +2734,7 @@ A154A07E215C78180010FFCC /* BlockListCell.swift in Sources */, 3D47CDCE22F3C3F3003BD7F7 /* NVActivityIndicatorAnimationBallScaleRippleMultiple.swift in Sources */, 40FC414329F74C7900BD7396 /* String+Extensions.swift in Sources */, + 40E7A3012A0E1C7A00E0231A /* SplashscreenViewController.swift in Sources */, 3D47CDCC22F3C3F3003BD7F7 /* NVActivityIndicatorAnimationBallScaleMultiple.swift in Sources */, A1EBEADC2097AE6E002B9087 /* DefaultValues.swift in Sources */, A1EBEAD02097AE6E002B9087 /* M13CheckboxController.swift in Sources */, @@ -2921,7 +2973,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 16; DEVELOPMENT_TEAM = V8J3Z26F6Z; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -2958,7 +3010,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 16; DEVELOPMENT_TEAM = V8J3Z26F6Z; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -3051,7 +3103,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 16; DEVELOPMENT_TEAM = V8J3Z26F6Z; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -3089,7 +3141,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 16; DEVELOPMENT_TEAM = V8J3Z26F6Z; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -3240,7 +3292,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 16; DEVELOPMENT_TEAM = V8J3Z26F6Z; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -3280,7 +3332,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 16; DEVELOPMENT_TEAM = V8J3Z26F6Z; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -3326,7 +3378,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 16; DEVELOPMENT_TEAM = V8J3Z26F6Z; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -3369,7 +3421,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 16; DEVELOPMENT_TEAM = V8J3Z26F6Z; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -3405,7 +3457,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 16; DEVELOPMENT_TEAM = V8J3Z26F6Z; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = "Lockdown Blocker/Info.plist"; @@ -3435,7 +3487,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 16; DEVELOPMENT_TEAM = V8J3Z26F6Z; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = "Lockdown Blocker/Info.plist"; @@ -3467,7 +3519,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 16; DEVELOPMENT_TEAM = V8J3Z26F6Z; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -3524,7 +3576,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 14; + CURRENT_PROJECT_VERSION = 16; DEVELOPMENT_TEAM = V8J3Z26F6Z; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/LockdowniOS/AdvancedPaywallView.swift b/LockdowniOS/AdvancedPaywallView.swift index 9d181a0..e3759b4 100644 --- a/LockdowniOS/AdvancedPaywallView.swift +++ b/LockdowniOS/AdvancedPaywallView.swift @@ -95,9 +95,9 @@ final class AdvancedPaywallView: UIView { imageView.translatesAutoresizingMaskIntoConstraints = false button.addSubview(imageView) NSLayoutConstraint.activate([ - imageView.trailingAnchor.constraint(equalTo: button.trailingAnchor, constant: 0), - imageView.topAnchor.constraint(equalTo: button.topAnchor, constant: 0) - ]) + imageView.trailingAnchor.constraint(equalTo: button.trailingAnchor, constant: 0), + imageView.topAnchor.constraint(equalTo: button.topAnchor, constant: 0) + ]) let titleLabel = UILabel() titleLabel.text = NSLocalizedString("7-Day FREE TRIAL", comment: "") @@ -110,7 +110,7 @@ final class AdvancedPaywallView: UIView { let descriptionLabel = UILabel() descriptionLabel.font = fontMedium11 - descriptionLabel.text = "then $35.99 per year" + descriptionLabel.text = "then \(VPNSubscription.getProductIdPrice(productId: VPNSubscription.productIdAdvancedYearly)) per year" descriptionLabel.textColor = .white descriptionLabel.textAlignment = .left button.addSubview(descriptionLabel) @@ -118,13 +118,13 @@ final class AdvancedPaywallView: UIView { descriptionLabel.anchors.leading.pin(inset: 24) let descriptionLabel2 = UILabel() - descriptionLabel2.text = "only $3 per month" + descriptionLabel2.text = "only $2.49 per month" descriptionLabel2.font = fontMedium11 descriptionLabel2.textColor = .white button.addSubview(descriptionLabel2) descriptionLabel2.anchors.top.spacing(14, to: imageView.anchors.bottom) descriptionLabel2.anchors.trailing.pin(inset: 24) - + button.anchors.height.equal(66) button.addTarget(self, action: #selector(buyButton1Clicked), for: .touchUpInside) @@ -147,7 +147,7 @@ final class AdvancedPaywallView: UIView { let descriptionLabel = UILabel() descriptionLabel.font = fontMedium11 - descriptionLabel.text = "$4.99/month" + descriptionLabel.text = "\(VPNSubscription.getProductIdPrice(productId: VPNSubscription.productIdAdvancedMonthly))/month" descriptionLabel.textColor = .white descriptionLabel.textAlignment = .left diff --git a/LockdowniOS/AnonymousPaywallView.swift b/LockdowniOS/AnonymousPaywallView.swift index 04ea8ee..e6190d8 100644 --- a/LockdowniOS/AnonymousPaywallView.swift +++ b/LockdowniOS/AnonymousPaywallView.swift @@ -123,9 +123,9 @@ final class AnonymousPaywallView: UIView { titleLabel.anchors.top.pin(inset: 16) titleLabel.anchors.leading.pin(inset: 24) - let descriptionLabel = UILabel() + var descriptionLabel = UILabel() descriptionLabel.font = fontMedium11 - descriptionLabel.text = "then $49.99 per year" + descriptionLabel.text = "then \(VPNSubscription.getProductIdPrice(productId: VPNSubscription.productIdAnnual)) per year" descriptionLabel.textColor = .white descriptionLabel.textAlignment = .left descriptionLabel.translatesAutoresizingMaskIntoConstraints = false @@ -134,7 +134,7 @@ final class AnonymousPaywallView: UIView { descriptionLabel.anchors.leading.pin(inset: 24) let descriptionLabel2 = UILabel() - descriptionLabel2.text = "only $4.17 per month" + descriptionLabel2.text = "only $4.99 per month" descriptionLabel2.font = fontMedium11 descriptionLabel2.textColor = .white button.addSubview(descriptionLabel2) @@ -146,6 +146,33 @@ final class AnonymousPaywallView: UIView { return button }() + lazy var button1TitleLabel: UILabel = { + let label = UILabel() + label.text = NSLocalizedString("7-Day FREE TRIAL", comment: "") + label.font = fontBold15 + label.textColor = .white + label.translatesAutoresizingMaskIntoConstraints = false + buyButton1.addSubview(button1TitleLabel) + label.anchors.top.pin(inset: 16) + label.anchors.leading.pin(inset: 24) + return label + }() + + lazy var button1DescriptionLabel: UILabel = { + let label = UILabel() + label.font = fontMedium11 + label.text = "then \(VPNSubscription.getProductIdPrice(productId: VPNSubscription.productIdAnnual)) per year" + label.textColor = .white + label.textAlignment = .left + label.translatesAutoresizingMaskIntoConstraints = false + buyButton1.addSubview(button1DescriptionLabel) + label.anchors.top.spacing(4, to: button1TitleLabel.anchors.bottom) + label.anchors.leading.pin(inset: 24) + + return label + }() + + lazy var buyButton2: UIButton = { let button = UIButton(type: .system) button.tintColor = .white @@ -162,7 +189,7 @@ final class AnonymousPaywallView: UIView { let descriptionLabel = UILabel() descriptionLabel.font = fontMedium11 - descriptionLabel.text = "$4.99/month" + descriptionLabel.text = "\(VPNSubscription.getProductIdPrice(productId: VPNSubscription.productIdMonthly))/month" descriptionLabel.textColor = .white descriptionLabel.textAlignment = .left diff --git a/LockdowniOS/AppDelegate.swift b/LockdowniOS/AppDelegate.swift index c13c713..cdfcbab 100644 --- a/LockdowniOS/AppDelegate.swift +++ b/LockdowniOS/AppDelegate.swift @@ -60,7 +60,45 @@ class AppDelegate: UIResponder, UIApplicationDelegate { connectivityService.startObservingConnectivity() + // Content Blocker + SFContentBlockerManager.reloadContentBlocker(withIdentifier: LockdownStorageIdentifier.contentBlockerId) { error in + if error != nil { + DDLogError("Error loading Content Blocker: \(String(describing: error))") + } + } + // Prepare IAP + + SwiftyStoreKit.completeTransactions(atomically: true) { purchases in + for purchase in purchases { + DDLogInfo("LAUNCH: Processing Purchase\n\(purchase)") + if purchase.transaction.transactionState == .purchased || purchase.transaction.transactionState == .restored { + if purchase.needsFinishTransaction { + DDLogInfo("Finishing transaction for purchase: \(purchase)") + SwiftyStoreKit.finishTransaction(purchase.transaction) + } + } + } + } + + VPNSubscription.cacheLocalizedPrices() + + BaseUserService.shared.updateUserSubscription{ subscription in + if subscription?.planType == .monthly || subscription?.planType == .annual { + UserDefaults.hasSeenAdvancedPaywall = false + UserDefaults.hasSeenUniversalPaywall = false + UserDefaults.hasSeenAnonymousPaywall = true + } + else if subscription?.planType == .proMonthly || subscription?.planType == .proAnnual { + UserDefaults.hasSeenAnonymousPaywall = false + UserDefaults.hasSeenAdvancedPaywall = false + UserDefaults.hasSeenUniversalPaywall = true + } else { + UserDefaults.hasSeenAnonymousPaywall = false + UserDefaults.hasSeenAdvancedPaywall = false + UserDefaults.hasSeenUniversalPaywall = false + } + } // Set up PopupDialog let dialogAppearance = PopupDialogDefaultView.appearance() @@ -110,12 +148,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } cancelButtonAppearance.titleFont = fontSemiBold17 cancelButtonAppearance.titleColor = UIColor.lightGray - - // Lockdown default lists - setupFirewallDefaultBlockLists() - - // Whitelist default domains - setupLockdownWhitelistedDomains() // Show indicator at top when internet not reachable reachability?.whenReachable = { reachability in @@ -138,27 +170,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate { DDLogError("Unable to start reachability notifier") } - // Content Blocker - SFContentBlockerManager.reloadContentBlocker( withIdentifier: "com.confirmed.lockdown.Confirmed-Blocker") { (_ error: Error?) -> Void in - if error != nil { - DDLogError("Error loading Content Blocker: \(String(describing: error))") - } - } - - // Prepare IAP - VPNSubscription.cacheLocalizedPrices() - SwiftyStoreKit.completeTransactions(atomically: true) { purchases in - for purchase in purchases { - DDLogInfo("LAUNCH: Processing Purchase\n\(purchase)"); - if purchase.transaction.transactionState == .purchased || purchase.transaction.transactionState == .restored { - if purchase.needsFinishTransaction { - DDLogInfo("Finishing transaction for purchase: \(purchase)") - SwiftyStoreKit.finishTransaction(purchase.transaction) - } - } - } - } - // Periodically check if the firewall is functioning correctly - every 2.5 hours if #available(iOS 13.0, *) { DDLogInfo("BGTask: Registering BGTask id \(FirewallRepair.identifier)") @@ -423,14 +434,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } else if (host == "toggleFirewall") { - if let home = self.getCurrentViewController() as? HomeViewController { - home.toggleFirewall(self) + if let home = self.getCurrentViewController() as? LDFirewallViewController { + home.toggleFirewall() } } else if (host == "toggleVPN") { - if let home = self.getCurrentViewController() as? HomeViewController { - home.toggleVPN(self) + if let home = self.getCurrentViewController() as? LDVpnViewController { + home.toggleVPN() } } diff --git a/LockdowniOS/Base.lproj/Main.storyboard b/LockdowniOS/Base.lproj/Main.storyboard index a8b088a..a152a6b 100644 --- a/LockdowniOS/Base.lproj/Main.storyboard +++ b/LockdowniOS/Base.lproj/Main.storyboard @@ -1068,7 +1068,7 @@ @@ -1098,7 +1098,7 @@