From a155569eb888cbf2d711e349fac536c9af7cdb89 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 13 May 2024 18:01:03 -0700 Subject: [PATCH 01/10] Apply recommended project updates --- Ka-Block.xcodeproj/project.pbxproj | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/Ka-Block.xcodeproj/project.pbxproj b/Ka-Block.xcodeproj/project.pbxproj index b03633f..e2f855f 100644 --- a/Ka-Block.xcodeproj/project.pbxproj +++ b/Ka-Block.xcodeproj/project.pbxproj @@ -7,8 +7,8 @@ objects = { /* Begin PBXBuildFile section */ - 03346D6926B08EA2004A268E /* Ka-Block! Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 03346D6826B08EA2004A268E /* Ka-Block! Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - 03346D7326B08EA2004A268E /* Ka-Block! Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 03346D7226B08EA2004A268E /* Ka-Block! Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 03346D6926B08EA2004A268E /* Ka-Block! Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 03346D6826B08EA2004A268E /* Ka-Block! Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 03346D7326B08EA2004A268E /* Ka-Block! Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 03346D7226B08EA2004A268E /* Ka-Block! Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 03346D8226B08EA2004A268E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 03346D3A26B08EA2004A268E /* Assets.xcassets */; }; 03346D8326B08EA2004A268E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 03346D3A26B08EA2004A268E /* Assets.xcassets */; }; 036A5C6E26C44E1500A76915 /* HomeScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 036A5C6D26C44E1500A76915 /* HomeScreen.swift */; }; @@ -46,26 +46,26 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ - 03346D9B26B08EA2004A268E /* Embed App Extensions */ = { + 03346D9B26B08EA2004A268E /* Embed Foundation Extensions */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 13; files = ( - 03346D6926B08EA2004A268E /* Ka-Block! Extension.appex in Embed App Extensions */, + 03346D6926B08EA2004A268E /* Ka-Block! Extension.appex in Embed Foundation Extensions */, ); - name = "Embed App Extensions"; + name = "Embed Foundation Extensions"; runOnlyForDeploymentPostprocessing = 0; }; - 03346DA226B08EA2004A268E /* Embed App Extensions */ = { + 03346DA226B08EA2004A268E /* Embed Foundation Extensions */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 13; files = ( - 03346D7326B08EA2004A268E /* Ka-Block! Extension.appex in Embed App Extensions */, + 03346D7326B08EA2004A268E /* Ka-Block! Extension.appex in Embed Foundation Extensions */, ); - name = "Embed App Extensions"; + name = "Embed Foundation Extensions"; runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ @@ -202,7 +202,7 @@ 03346D4626B08EA2004A268E /* Sources */, 03346D4726B08EA2004A268E /* Frameworks */, 03346D4826B08EA2004A268E /* Resources */, - 03346D9B26B08EA2004A268E /* Embed App Extensions */, + 03346D9B26B08EA2004A268E /* Embed Foundation Extensions */, ); buildRules = ( ); @@ -221,7 +221,7 @@ 03346D5826B08EA2004A268E /* Sources */, 03346D5926B08EA2004A268E /* Frameworks */, 03346D5A26B08EA2004A268E /* Resources */, - 03346DA226B08EA2004A268E /* Embed App Extensions */, + 03346DA226B08EA2004A268E /* Embed Foundation Extensions */, ); buildRules = ( ); @@ -275,7 +275,7 @@ attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1300; - LastUpgradeCheck = 1310; + LastUpgradeCheck = 1530; TargetAttributes = { 03346D4926B08EA2004A268E = { CreatedOnToolsVersion = 13.0; @@ -439,9 +439,11 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 8; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -501,9 +503,11 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 8; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -658,6 +662,7 @@ buildSettings = { CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; + DEAD_CODE_STRIPPING = YES; ENABLE_APP_SANDBOX = YES; ENABLE_HARDENED_RUNTIME = YES; ENABLE_USER_SELECTED_FILES = readonly; @@ -689,6 +694,7 @@ buildSettings = { CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; + DEAD_CODE_STRIPPING = YES; ENABLE_APP_SANDBOX = YES; ENABLE_HARDENED_RUNTIME = YES; ENABLE_USER_SELECTED_FILES = readonly; @@ -723,6 +729,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; + DEAD_CODE_STRIPPING = YES; ENABLE_APP_SANDBOX = YES; ENABLE_HARDENED_RUNTIME = YES; ENABLE_USER_SELECTED_FILES = readonly; @@ -758,6 +765,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; + DEAD_CODE_STRIPPING = YES; ENABLE_APP_SANDBOX = YES; ENABLE_HARDENED_RUNTIME = YES; ENABLE_USER_SELECTED_FILES = readonly; From 9623a0266621797ce89ac7d778760f7526335c5a Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 13 May 2024 18:02:49 -0700 Subject: [PATCH 02/10] Delete entry for missing asset --- Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json b/Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json index fcb3114..7e1f33f 100644 --- a/Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -205,10 +205,6 @@ "idiom" : "mac", "scale" : "2x", "size" : "512x512" - }, - { - "idiom" : "mac", - "size" : "1024x1024" } ], "info" : { From c01a362df8ca8ec45302db4bc6b0899b6af6b621 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 13 May 2024 18:04:31 -0700 Subject: [PATCH 03/10] Move deployment targets to project settings --- Ka-Block.xcodeproj/project.pbxproj | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Ka-Block.xcodeproj/project.pbxproj b/Ka-Block.xcodeproj/project.pbxproj index e2f855f..f399910 100644 --- a/Ka-Block.xcodeproj/project.pbxproj +++ b/Ka-Block.xcodeproj/project.pbxproj @@ -459,6 +459,8 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + MACOSX_DEPLOYMENT_TARGET = 11.0; MARKETING_VERSION = 4.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -517,6 +519,8 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + MACOSX_DEPLOYMENT_TARGET = 11.0; MARKETING_VERSION = 4.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; @@ -538,7 +542,6 @@ INFOPLIST_KEY_CFBundleVersion = 1; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -568,7 +571,6 @@ INFOPLIST_KEY_CFBundleVersion = 1; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -602,7 +604,6 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -637,7 +638,6 @@ INFOPLIST_KEY_UILaunchScreen_Generation = YES; INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -679,7 +679,6 @@ "@executable_path/../Frameworks", "@executable_path/../../../../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 11.0; PRODUCT_BUNDLE_IDENTIFIER = com.kablock.ios.KaBlockContentBlocker; PRODUCT_NAME = "Ka-Block! Extension"; SDKROOT = macosx; @@ -711,7 +710,6 @@ "@executable_path/../Frameworks", "@executable_path/../../../../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 11.0; PRODUCT_BUNDLE_IDENTIFIER = com.kablock.ios.KaBlockContentBlocker; PRODUCT_NAME = "Ka-Block! Extension"; SDKROOT = macosx; @@ -744,7 +742,6 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 11.0; OTHER_LDFLAGS = ( "-framework", WebKit, @@ -780,7 +777,6 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MACOSX_DEPLOYMENT_TARGET = 11.0; OTHER_LDFLAGS = ( "-framework", WebKit, From e2cf7fd818fdae6bed524c2f8fb56dded61a0f23 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 13 May 2024 18:07:19 -0700 Subject: [PATCH 04/10] Don't need to explicitly link against Cocoa --- Ka-Block.xcodeproj/project.pbxproj | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Ka-Block.xcodeproj/project.pbxproj b/Ka-Block.xcodeproj/project.pbxproj index f399910..2ae9096 100644 --- a/Ka-Block.xcodeproj/project.pbxproj +++ b/Ka-Block.xcodeproj/project.pbxproj @@ -25,7 +25,6 @@ 03AB920226BB231200C6DFFD /* blockerList.json in Resources */ = {isa = PBXBuildFile; fileRef = 03AB91F526BB20CE00C6DFFD /* blockerList.json */; }; 03AB920326BB231500C6DFFD /* blockerList.json in Resources */ = {isa = PBXBuildFile; fileRef = 03AB91F526BB20CE00C6DFFD /* blockerList.json */; }; 03AB922726BB254800C6DFFD /* KaBlockApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03AB922626BB254800C6DFFD /* KaBlockApp.swift */; platformFilter = ios; }; - 03E41C022737270700F87ACB /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03AB91F226BB20CE00C6DFFD /* Cocoa.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -83,7 +82,6 @@ 0381081226CC50D9008A912C /* ContentBlockerState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentBlockerState.swift; sourceTree = ""; }; 0381081526CC5794008A912C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 0397975C26BC86460014BF79 /* Logo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logo.swift; sourceTree = ""; }; - 03AB91F226BB20CE00C6DFFD /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 03AB91F526BB20CE00C6DFFD /* blockerList.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = blockerList.json; sourceTree = ""; }; 03AB91F726BB20CE00C6DFFD /* ContentBlockerRequestHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentBlockerRequestHandler.swift; sourceTree = ""; }; 03AB922626BB254800C6DFFD /* KaBlockApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KaBlockApp.swift; sourceTree = ""; }; @@ -115,7 +113,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 03E41C022737270700F87ACB /* Cocoa.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -129,7 +126,6 @@ 03346D3B26B08EA2004A268E /* Shared (Extension) */, 037870CB26EA993100075102 /* iOS (App) */, 037870C726EA98D400075102 /* macOS (App) */, - 03AB91F126BB20CE00C6DFFD /* Frameworks */, 03346D4B26B08EA2004A268E /* Products */, ); sourceTree = ""; @@ -184,14 +180,6 @@ path = "iOS (App)"; sourceTree = ""; }; - 03AB91F126BB20CE00C6DFFD /* Frameworks */ = { - isa = PBXGroup; - children = ( - 03AB91F226BB20CE00C6DFFD /* Cocoa.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ From 53512c6c1c6ac26c03476b2a8965dcb9c430c03a Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 13 May 2024 18:31:49 -0700 Subject: [PATCH 05/10] Merge macOS and iOS into single target --- Ka-Block.xcodeproj/project.pbxproj | 318 +++-------------------------- 1 file changed, 26 insertions(+), 292 deletions(-) diff --git a/Ka-Block.xcodeproj/project.pbxproj b/Ka-Block.xcodeproj/project.pbxproj index 2ae9096..00627ac 100644 --- a/Ka-Block.xcodeproj/project.pbxproj +++ b/Ka-Block.xcodeproj/project.pbxproj @@ -8,21 +8,14 @@ /* Begin PBXBuildFile section */ 03346D6926B08EA2004A268E /* Ka-Block! Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 03346D6826B08EA2004A268E /* Ka-Block! Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - 03346D7326B08EA2004A268E /* Ka-Block! Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 03346D7226B08EA2004A268E /* Ka-Block! Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 03346D8226B08EA2004A268E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 03346D3A26B08EA2004A268E /* Assets.xcassets */; }; - 03346D8326B08EA2004A268E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 03346D3A26B08EA2004A268E /* Assets.xcassets */; }; 036A5C6E26C44E1500A76915 /* HomeScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 036A5C6D26C44E1500A76915 /* HomeScreen.swift */; }; - 036A5C6F26C44E1500A76915 /* HomeScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 036A5C6D26C44E1500A76915 /* HomeScreen.swift */; }; - 036C97812738520300170DF1 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 036C9780273851FF00170DF1 /* Localizable.strings */; }; - 036C97832738522600170DF1 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 036C977F273851FD00170DF1 /* Localizable.strings */; }; - 037870CA26EA98FD00075102 /* KaBlockApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 037870C826EA98DD00075102 /* KaBlockApp.swift */; }; + 036B14902BF2F4C10053AD95 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 036C9780273851FF00170DF1 /* Localizable.strings */; platformFilters = (macos, ); }; + 036B14912BF2F4C30053AD95 /* KaBlockApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 037870C826EA98DD00075102 /* KaBlockApp.swift */; platformFilters = (macos, ); }; + 036C97832738522600170DF1 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 036C977F273851FD00170DF1 /* Localizable.strings */; platformFilter = ios; }; 0381081326CC50D9008A912C /* ContentBlockerState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0381081226CC50D9008A912C /* ContentBlockerState.swift */; }; - 0381081426CC50D9008A912C /* ContentBlockerState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0381081226CC50D9008A912C /* ContentBlockerState.swift */; }; 0397975D26BC86460014BF79 /* Logo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0397975C26BC86460014BF79 /* Logo.swift */; }; - 0397975E26BC86460014BF79 /* Logo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0397975C26BC86460014BF79 /* Logo.swift */; }; - 03AB920026BB211E00C6DFFD /* ContentBlockerRequestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03AB91F726BB20CE00C6DFFD /* ContentBlockerRequestHandler.swift */; }; 03AB920126BB211E00C6DFFD /* ContentBlockerRequestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03AB91F726BB20CE00C6DFFD /* ContentBlockerRequestHandler.swift */; }; - 03AB920226BB231200C6DFFD /* blockerList.json in Resources */ = {isa = PBXBuildFile; fileRef = 03AB91F526BB20CE00C6DFFD /* blockerList.json */; }; 03AB920326BB231500C6DFFD /* blockerList.json in Resources */ = {isa = PBXBuildFile; fileRef = 03AB91F526BB20CE00C6DFFD /* blockerList.json */; }; 03AB922726BB254800C6DFFD /* KaBlockApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03AB922626BB254800C6DFFD /* KaBlockApp.swift */; platformFilter = ios; }; /* End PBXBuildFile section */ @@ -35,13 +28,6 @@ remoteGlobalIDString = 03346D6726B08EA2004A268E; remoteInfo = "Ka-Block Extension (iOS)"; }; - 03346D7426B08EA2004A268E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 03346D2E26B08EA1004A268E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 03346D7126B08EA2004A268E; - remoteInfo = "Ka-Block Extension (macOS)"; - }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -56,25 +42,12 @@ name = "Embed Foundation Extensions"; runOnlyForDeploymentPostprocessing = 0; }; - 03346DA226B08EA2004A268E /* Embed Foundation Extensions */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - 03346D7326B08EA2004A268E /* Ka-Block! Extension.appex in Embed Foundation Extensions */, - ); - name = "Embed Foundation Extensions"; - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ 03346D3A26B08EA2004A268E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 03346D4A26B08EA2004A268E /* Ka-Block!.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Ka-Block!.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 03346D5C26B08EA2004A268E /* Ka-Block!.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Ka-Block!.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 03346D6826B08EA2004A268E /* Ka-Block! Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Ka-Block! Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; - 03346D7226B08EA2004A268E /* Ka-Block! Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Ka-Block! Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; 036A5C6D26C44E1500A76915 /* HomeScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeScreen.swift; sourceTree = ""; }; 036C977F273851FD00170DF1 /* Localizable.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = ""; }; 036C9780273851FF00170DF1 /* Localizable.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = ""; }; @@ -95,13 +68,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 03346D5926B08EA2004A268E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; 03346D6526B08EA2004A268E /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -109,13 +75,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 03346D6F26B08EA2004A268E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -155,9 +114,7 @@ isa = PBXGroup; children = ( 03346D4A26B08EA2004A268E /* Ka-Block!.app */, - 03346D5C26B08EA2004A268E /* Ka-Block!.app */, 03346D6826B08EA2004A268E /* Ka-Block! Extension.appex */, - 03346D7226B08EA2004A268E /* Ka-Block! Extension.appex */, ); name = Products; sourceTree = ""; @@ -183,9 +140,9 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 03346D4926B08EA2004A268E /* Ka-Block (iOS) */ = { + 03346D4926B08EA2004A268E /* Ka-Block */ = { isa = PBXNativeTarget; - buildConfigurationList = 03346D9C26B08EA2004A268E /* Build configuration list for PBXNativeTarget "Ka-Block (iOS)" */; + buildConfigurationList = 03346D9C26B08EA2004A268E /* Build configuration list for PBXNativeTarget "Ka-Block" */; buildPhases = ( 03346D4626B08EA2004A268E /* Sources */, 03346D4726B08EA2004A268E /* Frameworks */, @@ -197,33 +154,14 @@ dependencies = ( 03346D6B26B08EA2004A268E /* PBXTargetDependency */, ); - name = "Ka-Block (iOS)"; + name = "Ka-Block"; productName = "Ka-Block (iOS)"; productReference = 03346D4A26B08EA2004A268E /* Ka-Block!.app */; productType = "com.apple.product-type.application"; }; - 03346D5B26B08EA2004A268E /* Ka-Block (macOS) */ = { - isa = PBXNativeTarget; - buildConfigurationList = 03346DA326B08EA2004A268E /* Build configuration list for PBXNativeTarget "Ka-Block (macOS)" */; - buildPhases = ( - 03346D5826B08EA2004A268E /* Sources */, - 03346D5926B08EA2004A268E /* Frameworks */, - 03346D5A26B08EA2004A268E /* Resources */, - 03346DA226B08EA2004A268E /* Embed Foundation Extensions */, - ); - buildRules = ( - ); - dependencies = ( - 03346D7526B08EA2004A268E /* PBXTargetDependency */, - ); - name = "Ka-Block (macOS)"; - productName = "Ka-Block (macOS)"; - productReference = 03346D5C26B08EA2004A268E /* Ka-Block!.app */; - productType = "com.apple.product-type.application"; - }; - 03346D6726B08EA2004A268E /* Ka-Block Extension (iOS) */ = { + 03346D6726B08EA2004A268E /* Ka-Block Extension */ = { isa = PBXNativeTarget; - buildConfigurationList = 03346D9826B08EA2004A268E /* Build configuration list for PBXNativeTarget "Ka-Block Extension (iOS)" */; + buildConfigurationList = 03346D9826B08EA2004A268E /* Build configuration list for PBXNativeTarget "Ka-Block Extension" */; buildPhases = ( 03346D6426B08EA2004A268E /* Sources */, 03346D6526B08EA2004A268E /* Frameworks */, @@ -233,28 +171,11 @@ ); dependencies = ( ); - name = "Ka-Block Extension (iOS)"; + name = "Ka-Block Extension"; productName = "Ka-Block Extension (iOS)"; productReference = 03346D6826B08EA2004A268E /* Ka-Block! Extension.appex */; productType = "com.apple.product-type.app-extension"; }; - 03346D7126B08EA2004A268E /* Ka-Block Extension (macOS) */ = { - isa = PBXNativeTarget; - buildConfigurationList = 03346D9F26B08EA2004A268E /* Build configuration list for PBXNativeTarget "Ka-Block Extension (macOS)" */; - buildPhases = ( - 03346D6E26B08EA2004A268E /* Sources */, - 03346D6F26B08EA2004A268E /* Frameworks */, - 03346D7026B08EA2004A268E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Ka-Block Extension (macOS)"; - productName = "Ka-Block Extension (macOS)"; - productReference = 03346D7226B08EA2004A268E /* Ka-Block! Extension.appex */; - productType = "com.apple.product-type.app-extension"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -268,15 +189,9 @@ 03346D4926B08EA2004A268E = { CreatedOnToolsVersion = 13.0; }; - 03346D5B26B08EA2004A268E = { - CreatedOnToolsVersion = 13.0; - }; 03346D6726B08EA2004A268E = { CreatedOnToolsVersion = 13.0; }; - 03346D7126B08EA2004A268E = { - CreatedOnToolsVersion = 13.0; - }; }; }; buildConfigurationList = 03346D3126B08EA1004A268E /* Build configuration list for PBXProject "Ka-Block" */; @@ -292,10 +207,8 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 03346D4926B08EA2004A268E /* Ka-Block (iOS) */, - 03346D5B26B08EA2004A268E /* Ka-Block (macOS) */, - 03346D6726B08EA2004A268E /* Ka-Block Extension (iOS) */, - 03346D7126B08EA2004A268E /* Ka-Block Extension (macOS) */, + 03346D4926B08EA2004A268E /* Ka-Block */, + 03346D6726B08EA2004A268E /* Ka-Block Extension */, ); }; /* End PBXProject section */ @@ -306,19 +219,11 @@ buildActionMask = 2147483647; files = ( 03346D8226B08EA2004A268E /* Assets.xcassets in Resources */, + 036B14902BF2F4C10053AD95 /* Localizable.strings in Resources */, 036C97832738522600170DF1 /* Localizable.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 03346D5A26B08EA2004A268E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 03346D8326B08EA2004A268E /* Assets.xcassets in Resources */, - 036C97812738520300170DF1 /* Localizable.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 03346D6626B08EA2004A268E /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -327,14 +232,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 03346D7026B08EA2004A268E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 03AB920226BB231200C6DFFD /* blockerList.json in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -344,22 +241,12 @@ files = ( 0381081326CC50D9008A912C /* ContentBlockerState.swift in Sources */, 036A5C6E26C44E1500A76915 /* HomeScreen.swift in Sources */, + 036B14912BF2F4C30053AD95 /* KaBlockApp.swift in Sources */, 0397975D26BC86460014BF79 /* Logo.swift in Sources */, 03AB922726BB254800C6DFFD /* KaBlockApp.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 03346D5826B08EA2004A268E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 0381081426CC50D9008A912C /* ContentBlockerState.swift in Sources */, - 036A5C6F26C44E1500A76915 /* HomeScreen.swift in Sources */, - 037870CA26EA98FD00075102 /* KaBlockApp.swift in Sources */, - 0397975E26BC86460014BF79 /* Logo.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 03346D6426B08EA2004A268E /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -368,27 +255,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 03346D6E26B08EA2004A268E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 03AB920026BB211E00C6DFFD /* ContentBlockerRequestHandler.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 03346D6B26B08EA2004A268E /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 03346D6726B08EA2004A268E /* Ka-Block Extension (iOS) */; + target = 03346D6726B08EA2004A268E /* Ka-Block Extension */; targetProxy = 03346D6A26B08EA2004A268E /* PBXContainerItemProxy */; }; - 03346D7526B08EA2004A268E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 03346D7126B08EA2004A268E /* Ka-Block Extension (macOS) */; - targetProxy = 03346D7426B08EA2004A268E /* PBXContainerItemProxy */; - }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ @@ -539,7 +413,9 @@ PRODUCT_NAME = "Ka-Block! Extension"; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2,6"; @@ -568,7 +444,9 @@ PRODUCT_NAME = "Ka-Block! Extension"; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2,6"; @@ -585,6 +463,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_CFBundleDisplayName = "Ka-Block!"; INFOPLIST_KEY_CFBundleExecutable = "Ka-Block!"; INFOPLIST_KEY_CFBundleName = "Ka-Block!"; INFOPLIST_KEY_CFBundleVersion = 1; @@ -603,7 +482,9 @@ PRODUCT_BUNDLE_IDENTIFIER = com.kablock.ios; PRODUCT_NAME = "Ka-Block!"; SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -619,6 +500,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_CFBundleDisplayName = "Ka-Block!"; INFOPLIST_KEY_CFBundleExecutable = "Ka-Block!"; INFOPLIST_KEY_CFBundleName = "Ka-Block!"; INFOPLIST_KEY_CFBundleVersion = 1; @@ -637,7 +519,9 @@ PRODUCT_BUNDLE_IDENTIFIER = com.kablock.ios; PRODUCT_NAME = "Ka-Block!"; SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -645,138 +529,6 @@ }; name = Release; }; - 03346DA026B08EA2004A268E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - CODE_SIGN_STYLE = Automatic; - DEAD_CODE_STRIPPING = YES; - ENABLE_APP_SANDBOX = YES; - ENABLE_HARDENED_RUNTIME = YES; - ENABLE_USER_SELECTED_FILES = readonly; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = "Shared (Extension)/Info.plist"; - INFOPLIST_KEY_CFBundleDisplayName = "Ka-Block!"; - INFOPLIST_KEY_CFBundleExecutable = "Ka-Block! Extension"; - INFOPLIST_KEY_CFBundleName = "Ka-Block! Extension"; - INFOPLIST_KEY_CFBundleVersion = 1; - INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - "@executable_path/../../../../Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.kablock.ios.KaBlockContentBlocker; - PRODUCT_NAME = "Ka-Block! Extension"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - 03346DA126B08EA2004A268E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_IDENTITY = "-"; - CODE_SIGN_STYLE = Automatic; - DEAD_CODE_STRIPPING = YES; - ENABLE_APP_SANDBOX = YES; - ENABLE_HARDENED_RUNTIME = YES; - ENABLE_USER_SELECTED_FILES = readonly; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = "Shared (Extension)/Info.plist"; - INFOPLIST_KEY_CFBundleDisplayName = "Ka-Block!"; - INFOPLIST_KEY_CFBundleExecutable = "Ka-Block! Extension"; - INFOPLIST_KEY_CFBundleName = "Ka-Block! Extension"; - INFOPLIST_KEY_CFBundleVersion = 1; - INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; - INFOPLIST_KEY_NSHumanReadableCopyright = ""; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - "@executable_path/../../../../Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.kablock.ios.KaBlockContentBlocker; - PRODUCT_NAME = "Ka-Block! Extension"; - SDKROOT = macosx; - SKIP_INSTALL = YES; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; - 03346DA426B08EA2004A268E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_IDENTITY = "-"; - CODE_SIGN_STYLE = Automatic; - DEAD_CODE_STRIPPING = YES; - ENABLE_APP_SANDBOX = YES; - ENABLE_HARDENED_RUNTIME = YES; - ENABLE_USER_SELECTED_FILES = readonly; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_CFBundleDisplayName = "Ka-Block!"; - INFOPLIST_KEY_CFBundleExecutable = "Ka-Block!"; - INFOPLIST_KEY_CFBundleName = "Ka-Block!"; - INFOPLIST_KEY_CFBundleVersion = 1; - INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; - INFOPLIST_KEY_NSPrincipalClass = NSApplication; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - OTHER_LDFLAGS = ( - "-framework", - WebKit, - ); - PRODUCT_BUNDLE_IDENTIFIER = com.kablock.ios; - PRODUCT_NAME = "Ka-Block!"; - SDKROOT = macosx; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - 03346DA526B08EA2004A268E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_IDENTITY = "-"; - CODE_SIGN_STYLE = Automatic; - DEAD_CODE_STRIPPING = YES; - ENABLE_APP_SANDBOX = YES; - ENABLE_HARDENED_RUNTIME = YES; - ENABLE_USER_SELECTED_FILES = readonly; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_CFBundleDisplayName = "Ka-Block!"; - INFOPLIST_KEY_CFBundleExecutable = "Ka-Block!"; - INFOPLIST_KEY_CFBundleName = "Ka-Block!"; - INFOPLIST_KEY_CFBundleVersion = 1; - INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; - INFOPLIST_KEY_NSPrincipalClass = NSApplication; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - OTHER_LDFLAGS = ( - "-framework", - WebKit, - ); - PRODUCT_BUNDLE_IDENTIFIER = com.kablock.ios; - PRODUCT_NAME = "Ka-Block!"; - SDKROOT = macosx; - SWIFT_EMIT_LOC_STRINGS = YES; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -789,7 +541,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 03346D9826B08EA2004A268E /* Build configuration list for PBXNativeTarget "Ka-Block Extension (iOS)" */ = { + 03346D9826B08EA2004A268E /* Build configuration list for PBXNativeTarget "Ka-Block Extension" */ = { isa = XCConfigurationList; buildConfigurations = ( 03346D9926B08EA2004A268E /* Debug */, @@ -798,7 +550,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 03346D9C26B08EA2004A268E /* Build configuration list for PBXNativeTarget "Ka-Block (iOS)" */ = { + 03346D9C26B08EA2004A268E /* Build configuration list for PBXNativeTarget "Ka-Block" */ = { isa = XCConfigurationList; buildConfigurations = ( 03346D9D26B08EA2004A268E /* Debug */, @@ -807,24 +559,6 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 03346D9F26B08EA2004A268E /* Build configuration list for PBXNativeTarget "Ka-Block Extension (macOS)" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 03346DA026B08EA2004A268E /* Debug */, - 03346DA126B08EA2004A268E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 03346DA326B08EA2004A268E /* Build configuration list for PBXNativeTarget "Ka-Block (macOS)" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 03346DA426B08EA2004A268E /* Debug */, - 03346DA526B08EA2004A268E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; /* End XCConfigurationList section */ }; rootObject = 03346D2E26B08EA1004A268E /* Project object */; From 92060fbb85bee80237ef888b44a3d2fc3f2e4414 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 13 May 2024 18:46:33 -0700 Subject: [PATCH 06/10] Merge different platform folders --- .../AccentColor.colorset/Contents.json | 0 .../AppIcon.appiconset/1024x1024-1.png | Bin .../AppIcon.appiconset/1024x1024.png | Bin .../AppIcon.appiconset/128x128.png | Bin .../AppIcon.appiconset/16x16.png | Bin .../AppIcon.appiconset/256x256-1.png | Bin .../AppIcon.appiconset/256x256.png | Bin .../AppIcon.appiconset/29x29-1.png | Bin .../AppIcon.appiconset/29x29.png | Bin .../AppIcon.appiconset/29x29@2x-1.png | Bin .../AppIcon.appiconset/29x29@2x.png | Bin .../AppIcon.appiconset/29x29@3x.png | Bin .../AppIcon.appiconset/32x32-1.png | Bin .../AppIcon.appiconset/32x32.png | Bin .../AppIcon.appiconset/40x40.png | Bin .../AppIcon.appiconset/40x40@2x-1.png | Bin .../AppIcon.appiconset/40x40@2x.png | Bin .../AppIcon.appiconset/40x40@3x.png | Bin .../AppIcon.appiconset/50x50.png | Bin .../AppIcon.appiconset/50x50@2x.png | Bin .../AppIcon.appiconset/512x512-1.png | Bin .../AppIcon.appiconset/512x512.png | Bin .../AppIcon.appiconset/57x57.png | Bin .../AppIcon.appiconset/57x57@2x.png | Bin .../AppIcon.appiconset/60x60@2x.png | Bin .../AppIcon.appiconset/60x60@3x.png | Bin .../AppIcon.appiconset/64x64.png | Bin .../AppIcon.appiconset/72x72.png | Bin .../AppIcon.appiconset/72x72@2x.png | Bin .../AppIcon.appiconset/76x76.png | Bin .../AppIcon.appiconset/76x76@2x.png | Bin .../AppIcon.appiconset/83.5x83.5@2x.png | Bin .../AppIcon.appiconset/Contents.json | 0 .../Assets.xcassets/Contents.json | 0 .../LargeIcon.imageset/Contents.json | 0 .../LogoDisabledColor.colorset/Contents.json | 0 .../LogoEnabledColor.colorset/Contents.json | 0 .../Contents.json | 0 .../Contents.json | 0 .../ContentBlockerState.swift | 0 {Shared (App) => App}/HomeScreen.swift | 0 App/KaBlockApp.swift | 68 ++++++++++++++++++ {iOS (App) => App}/Localizable.strings | 0 {Shared (App) => App}/Logo.swift | 0 .../ContentBlockerRequestHandler.swift | 0 {Shared (Extension) => Extension}/Info.plist | 0 .../blockerList.json | 0 Ka-Block.xcodeproj/project.pbxproj | 48 ++++--------- iOS (App)/KaBlockApp.swift | 12 ---- macOS (App)/KaBlockApp.swift | 58 --------------- macOS (App)/Localizable.strings | 2 - 51 files changed, 80 insertions(+), 108 deletions(-) rename {Shared (App) => App}/Assets.xcassets/AccentColor.colorset/Contents.json (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/1024x1024-1.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/1024x1024.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/128x128.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/16x16.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/256x256-1.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/256x256.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/29x29-1.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/29x29.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/29x29@2x-1.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/29x29@2x.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/29x29@3x.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/32x32-1.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/32x32.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/40x40.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/40x40@2x-1.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/40x40@2x.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/40x40@3x.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/50x50.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/50x50@2x.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/512x512-1.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/512x512.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/57x57.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/57x57@2x.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/60x60@2x.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/60x60@3x.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/64x64.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/72x72.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/72x72@2x.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/76x76.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/76x76@2x.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/83.5x83.5@2x.png (100%) rename {Shared (App) => App}/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename {Shared (App) => App}/Assets.xcassets/Contents.json (100%) rename {Shared (App) => App}/Assets.xcassets/LargeIcon.imageset/Contents.json (100%) rename {Shared (App) => App}/Assets.xcassets/LogoDisabledColor.colorset/Contents.json (100%) rename {Shared (App) => App}/Assets.xcassets/LogoEnabledColor.colorset/Contents.json (100%) rename {Shared (App) => App}/Assets.xcassets/LowerBackgroundColor.colorset/Contents.json (100%) rename {Shared (App) => App}/Assets.xcassets/UpperBackgroundColor.colorset/Contents.json (100%) rename {Shared (App) => App}/ContentBlockerState.swift (100%) rename {Shared (App) => App}/HomeScreen.swift (100%) create mode 100644 App/KaBlockApp.swift rename {iOS (App) => App}/Localizable.strings (100%) rename {Shared (App) => App}/Logo.swift (100%) rename {Shared (Extension) => Extension}/ContentBlockerRequestHandler.swift (100%) rename {Shared (Extension) => Extension}/Info.plist (100%) rename {Shared (Extension) => Extension}/blockerList.json (100%) delete mode 100644 iOS (App)/KaBlockApp.swift delete mode 100644 macOS (App)/KaBlockApp.swift delete mode 100644 macOS (App)/Localizable.strings diff --git a/Shared (App)/Assets.xcassets/AccentColor.colorset/Contents.json b/App/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from Shared (App)/Assets.xcassets/AccentColor.colorset/Contents.json rename to App/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/1024x1024-1.png b/App/Assets.xcassets/AppIcon.appiconset/1024x1024-1.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/1024x1024-1.png rename to App/Assets.xcassets/AppIcon.appiconset/1024x1024-1.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/1024x1024.png b/App/Assets.xcassets/AppIcon.appiconset/1024x1024.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/1024x1024.png rename to App/Assets.xcassets/AppIcon.appiconset/1024x1024.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/128x128.png b/App/Assets.xcassets/AppIcon.appiconset/128x128.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/128x128.png rename to App/Assets.xcassets/AppIcon.appiconset/128x128.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/16x16.png b/App/Assets.xcassets/AppIcon.appiconset/16x16.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/16x16.png rename to App/Assets.xcassets/AppIcon.appiconset/16x16.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/256x256-1.png b/App/Assets.xcassets/AppIcon.appiconset/256x256-1.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/256x256-1.png rename to App/Assets.xcassets/AppIcon.appiconset/256x256-1.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/256x256.png b/App/Assets.xcassets/AppIcon.appiconset/256x256.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/256x256.png rename to App/Assets.xcassets/AppIcon.appiconset/256x256.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/29x29-1.png b/App/Assets.xcassets/AppIcon.appiconset/29x29-1.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/29x29-1.png rename to App/Assets.xcassets/AppIcon.appiconset/29x29-1.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/29x29.png b/App/Assets.xcassets/AppIcon.appiconset/29x29.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/29x29.png rename to App/Assets.xcassets/AppIcon.appiconset/29x29.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/29x29@2x-1.png b/App/Assets.xcassets/AppIcon.appiconset/29x29@2x-1.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/29x29@2x-1.png rename to App/Assets.xcassets/AppIcon.appiconset/29x29@2x-1.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/29x29@2x.png b/App/Assets.xcassets/AppIcon.appiconset/29x29@2x.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/29x29@2x.png rename to App/Assets.xcassets/AppIcon.appiconset/29x29@2x.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/29x29@3x.png b/App/Assets.xcassets/AppIcon.appiconset/29x29@3x.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/29x29@3x.png rename to App/Assets.xcassets/AppIcon.appiconset/29x29@3x.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/32x32-1.png b/App/Assets.xcassets/AppIcon.appiconset/32x32-1.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/32x32-1.png rename to App/Assets.xcassets/AppIcon.appiconset/32x32-1.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/32x32.png b/App/Assets.xcassets/AppIcon.appiconset/32x32.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/32x32.png rename to App/Assets.xcassets/AppIcon.appiconset/32x32.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/40x40.png b/App/Assets.xcassets/AppIcon.appiconset/40x40.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/40x40.png rename to App/Assets.xcassets/AppIcon.appiconset/40x40.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/40x40@2x-1.png b/App/Assets.xcassets/AppIcon.appiconset/40x40@2x-1.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/40x40@2x-1.png rename to App/Assets.xcassets/AppIcon.appiconset/40x40@2x-1.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/40x40@2x.png b/App/Assets.xcassets/AppIcon.appiconset/40x40@2x.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/40x40@2x.png rename to App/Assets.xcassets/AppIcon.appiconset/40x40@2x.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/40x40@3x.png b/App/Assets.xcassets/AppIcon.appiconset/40x40@3x.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/40x40@3x.png rename to App/Assets.xcassets/AppIcon.appiconset/40x40@3x.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/50x50.png b/App/Assets.xcassets/AppIcon.appiconset/50x50.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/50x50.png rename to App/Assets.xcassets/AppIcon.appiconset/50x50.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/50x50@2x.png b/App/Assets.xcassets/AppIcon.appiconset/50x50@2x.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/50x50@2x.png rename to App/Assets.xcassets/AppIcon.appiconset/50x50@2x.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/512x512-1.png b/App/Assets.xcassets/AppIcon.appiconset/512x512-1.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/512x512-1.png rename to App/Assets.xcassets/AppIcon.appiconset/512x512-1.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/512x512.png b/App/Assets.xcassets/AppIcon.appiconset/512x512.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/512x512.png rename to App/Assets.xcassets/AppIcon.appiconset/512x512.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/57x57.png b/App/Assets.xcassets/AppIcon.appiconset/57x57.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/57x57.png rename to App/Assets.xcassets/AppIcon.appiconset/57x57.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/57x57@2x.png b/App/Assets.xcassets/AppIcon.appiconset/57x57@2x.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/57x57@2x.png rename to App/Assets.xcassets/AppIcon.appiconset/57x57@2x.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/60x60@2x.png b/App/Assets.xcassets/AppIcon.appiconset/60x60@2x.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/60x60@2x.png rename to App/Assets.xcassets/AppIcon.appiconset/60x60@2x.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/60x60@3x.png b/App/Assets.xcassets/AppIcon.appiconset/60x60@3x.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/60x60@3x.png rename to App/Assets.xcassets/AppIcon.appiconset/60x60@3x.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/64x64.png b/App/Assets.xcassets/AppIcon.appiconset/64x64.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/64x64.png rename to App/Assets.xcassets/AppIcon.appiconset/64x64.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/72x72.png b/App/Assets.xcassets/AppIcon.appiconset/72x72.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/72x72.png rename to App/Assets.xcassets/AppIcon.appiconset/72x72.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/72x72@2x.png b/App/Assets.xcassets/AppIcon.appiconset/72x72@2x.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/72x72@2x.png rename to App/Assets.xcassets/AppIcon.appiconset/72x72@2x.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/76x76.png b/App/Assets.xcassets/AppIcon.appiconset/76x76.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/76x76.png rename to App/Assets.xcassets/AppIcon.appiconset/76x76.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/76x76@2x.png b/App/Assets.xcassets/AppIcon.appiconset/76x76@2x.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/76x76@2x.png rename to App/Assets.xcassets/AppIcon.appiconset/76x76@2x.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/83.5x83.5@2x.png b/App/Assets.xcassets/AppIcon.appiconset/83.5x83.5@2x.png similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/83.5x83.5@2x.png rename to App/Assets.xcassets/AppIcon.appiconset/83.5x83.5@2x.png diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json b/App/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json rename to App/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/Shared (App)/Assets.xcassets/Contents.json b/App/Assets.xcassets/Contents.json similarity index 100% rename from Shared (App)/Assets.xcassets/Contents.json rename to App/Assets.xcassets/Contents.json diff --git a/Shared (App)/Assets.xcassets/LargeIcon.imageset/Contents.json b/App/Assets.xcassets/LargeIcon.imageset/Contents.json similarity index 100% rename from Shared (App)/Assets.xcassets/LargeIcon.imageset/Contents.json rename to App/Assets.xcassets/LargeIcon.imageset/Contents.json diff --git a/Shared (App)/Assets.xcassets/LogoDisabledColor.colorset/Contents.json b/App/Assets.xcassets/LogoDisabledColor.colorset/Contents.json similarity index 100% rename from Shared (App)/Assets.xcassets/LogoDisabledColor.colorset/Contents.json rename to App/Assets.xcassets/LogoDisabledColor.colorset/Contents.json diff --git a/Shared (App)/Assets.xcassets/LogoEnabledColor.colorset/Contents.json b/App/Assets.xcassets/LogoEnabledColor.colorset/Contents.json similarity index 100% rename from Shared (App)/Assets.xcassets/LogoEnabledColor.colorset/Contents.json rename to App/Assets.xcassets/LogoEnabledColor.colorset/Contents.json diff --git a/Shared (App)/Assets.xcassets/LowerBackgroundColor.colorset/Contents.json b/App/Assets.xcassets/LowerBackgroundColor.colorset/Contents.json similarity index 100% rename from Shared (App)/Assets.xcassets/LowerBackgroundColor.colorset/Contents.json rename to App/Assets.xcassets/LowerBackgroundColor.colorset/Contents.json diff --git a/Shared (App)/Assets.xcassets/UpperBackgroundColor.colorset/Contents.json b/App/Assets.xcassets/UpperBackgroundColor.colorset/Contents.json similarity index 100% rename from Shared (App)/Assets.xcassets/UpperBackgroundColor.colorset/Contents.json rename to App/Assets.xcassets/UpperBackgroundColor.colorset/Contents.json diff --git a/Shared (App)/ContentBlockerState.swift b/App/ContentBlockerState.swift similarity index 100% rename from Shared (App)/ContentBlockerState.swift rename to App/ContentBlockerState.swift diff --git a/Shared (App)/HomeScreen.swift b/App/HomeScreen.swift similarity index 100% rename from Shared (App)/HomeScreen.swift rename to App/HomeScreen.swift diff --git a/App/KaBlockApp.swift b/App/KaBlockApp.swift new file mode 100644 index 0000000..1e4b585 --- /dev/null +++ b/App/KaBlockApp.swift @@ -0,0 +1,68 @@ +import SwiftUI + +@main +struct KaBlockApp: App { + @ObservedObject var contentBlockerState = ContentBlockerState(withIdentifier: "com.kablock.ios.KaBlockContentBlocker") + + #if os(macOS) + @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate + #endif + + var body: some Scene { + #if os(iOS) + WindowGroup { + HomeScreen(isEnabled: contentBlockerState.isEnabled) + } + #elseif os(macOS) + WindowGroup { + HomeScreen(isEnabled: contentBlockerState.isEnabled) + .frame(width: 375, height: 640) + .background(NonResizableWindow()) + } + .windowStyle(HiddenTitleBarWindowStyle()) + #endif + } +} + +#if os(macOS) + struct NonResizableWindow: NSViewRepresentable { + func makeNSView(context _: Context) -> NSView { + let view = NSView() + DispatchQueue.main.async { + guard let window = view.window else { return } + window.styleMask = [.closable, .titled, .fullSizeContentView] + window.collectionBehavior = [.fullScreenNone] + + if let menu = window.menu { + let appMenuItem = menu.item(withTitle: "Ka-Block!")! + let fileMenuItem = menu.item(withTitle: "File")! + + menu.items = [appMenuItem, fileMenuItem] + + appMenuItem.submenu!.items = [ + appMenuItem.submenu!.item(withTitle: "About Ka-Block!")!, + NSMenuItem.separator(), + appMenuItem.submenu!.item(withTitle: "Quit Ka-Block!")!, + ] + + fileMenuItem.submenu!.items = [ + fileMenuItem.submenu!.item(withTitle: "Close")!, + ] + } + } + return view + } + + func updateNSView(_: NSView, context _: Context) {} + } + + class AppDelegate: NSObject, NSApplicationDelegate { + func applicationDidFinishLaunching(_: Notification) { + NSWindow.allowsAutomaticWindowTabbing = false + } + + func applicationShouldTerminateAfterLastWindowClosed(_: NSApplication) -> Bool { + true + } + } +#endif diff --git a/iOS (App)/Localizable.strings b/App/Localizable.strings similarity index 100% rename from iOS (App)/Localizable.strings rename to App/Localizable.strings diff --git a/Shared (App)/Logo.swift b/App/Logo.swift similarity index 100% rename from Shared (App)/Logo.swift rename to App/Logo.swift diff --git a/Shared (Extension)/ContentBlockerRequestHandler.swift b/Extension/ContentBlockerRequestHandler.swift similarity index 100% rename from Shared (Extension)/ContentBlockerRequestHandler.swift rename to Extension/ContentBlockerRequestHandler.swift diff --git a/Shared (Extension)/Info.plist b/Extension/Info.plist similarity index 100% rename from Shared (Extension)/Info.plist rename to Extension/Info.plist diff --git a/Shared (Extension)/blockerList.json b/Extension/blockerList.json similarity index 100% rename from Shared (Extension)/blockerList.json rename to Extension/blockerList.json diff --git a/Ka-Block.xcodeproj/project.pbxproj b/Ka-Block.xcodeproj/project.pbxproj index 00627ac..68a8161 100644 --- a/Ka-Block.xcodeproj/project.pbxproj +++ b/Ka-Block.xcodeproj/project.pbxproj @@ -10,14 +10,12 @@ 03346D6926B08EA2004A268E /* Ka-Block! Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 03346D6826B08EA2004A268E /* Ka-Block! Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 03346D8226B08EA2004A268E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 03346D3A26B08EA2004A268E /* Assets.xcassets */; }; 036A5C6E26C44E1500A76915 /* HomeScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 036A5C6D26C44E1500A76915 /* HomeScreen.swift */; }; - 036B14902BF2F4C10053AD95 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 036C9780273851FF00170DF1 /* Localizable.strings */; platformFilters = (macos, ); }; - 036B14912BF2F4C30053AD95 /* KaBlockApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 037870C826EA98DD00075102 /* KaBlockApp.swift */; platformFilters = (macos, ); }; - 036C97832738522600170DF1 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 036C977F273851FD00170DF1 /* Localizable.strings */; platformFilter = ios; }; + 036C97832738522600170DF1 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 036C977F273851FD00170DF1 /* Localizable.strings */; }; 0381081326CC50D9008A912C /* ContentBlockerState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0381081226CC50D9008A912C /* ContentBlockerState.swift */; }; 0397975D26BC86460014BF79 /* Logo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0397975C26BC86460014BF79 /* Logo.swift */; }; 03AB920126BB211E00C6DFFD /* ContentBlockerRequestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03AB91F726BB20CE00C6DFFD /* ContentBlockerRequestHandler.swift */; }; 03AB920326BB231500C6DFFD /* blockerList.json in Resources */ = {isa = PBXBuildFile; fileRef = 03AB91F526BB20CE00C6DFFD /* blockerList.json */; }; - 03AB922726BB254800C6DFFD /* KaBlockApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03AB922626BB254800C6DFFD /* KaBlockApp.swift */; platformFilter = ios; }; + 03AB922726BB254800C6DFFD /* KaBlockApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03AB922626BB254800C6DFFD /* KaBlockApp.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -50,8 +48,6 @@ 03346D6826B08EA2004A268E /* Ka-Block! Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Ka-Block! Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; 036A5C6D26C44E1500A76915 /* HomeScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeScreen.swift; sourceTree = ""; }; 036C977F273851FD00170DF1 /* Localizable.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = ""; }; - 036C9780273851FF00170DF1 /* Localizable.strings */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = ""; }; - 037870C826EA98DD00075102 /* KaBlockApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KaBlockApp.swift; sourceTree = ""; }; 0381081226CC50D9008A912C /* ContentBlockerState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentBlockerState.swift; sourceTree = ""; }; 0381081526CC5794008A912C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 0397975C26BC86460014BF79 /* Logo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logo.swift; sourceTree = ""; }; @@ -81,33 +77,33 @@ 03346D2D26B08EA1004A268E = { isa = PBXGroup; children = ( - 03346D3226B08EA1004A268E /* Shared (App) */, - 03346D3B26B08EA2004A268E /* Shared (Extension) */, - 037870CB26EA993100075102 /* iOS (App) */, - 037870C726EA98D400075102 /* macOS (App) */, + 03346D3226B08EA1004A268E /* App */, + 03346D3B26B08EA2004A268E /* Extension */, 03346D4B26B08EA2004A268E /* Products */, ); sourceTree = ""; }; - 03346D3226B08EA1004A268E /* Shared (App) */ = { + 03346D3226B08EA1004A268E /* App */ = { isa = PBXGroup; children = ( 03346D3A26B08EA2004A268E /* Assets.xcassets */, + 03AB922626BB254800C6DFFD /* KaBlockApp.swift */, 0381081226CC50D9008A912C /* ContentBlockerState.swift */, 036A5C6D26C44E1500A76915 /* HomeScreen.swift */, 0397975C26BC86460014BF79 /* Logo.swift */, + 036C977F273851FD00170DF1 /* Localizable.strings */, ); - path = "Shared (App)"; + path = App; sourceTree = ""; }; - 03346D3B26B08EA2004A268E /* Shared (Extension) */ = { + 03346D3B26B08EA2004A268E /* Extension */ = { isa = PBXGroup; children = ( 03AB91F726BB20CE00C6DFFD /* ContentBlockerRequestHandler.swift */, 03AB91F526BB20CE00C6DFFD /* blockerList.json */, 0381081526CC5794008A912C /* Info.plist */, ); - path = "Shared (Extension)"; + path = Extension; sourceTree = ""; }; 03346D4B26B08EA2004A268E /* Products */ = { @@ -119,24 +115,6 @@ name = Products; sourceTree = ""; }; - 037870C726EA98D400075102 /* macOS (App) */ = { - isa = PBXGroup; - children = ( - 037870C826EA98DD00075102 /* KaBlockApp.swift */, - 036C9780273851FF00170DF1 /* Localizable.strings */, - ); - path = "macOS (App)"; - sourceTree = ""; - }; - 037870CB26EA993100075102 /* iOS (App) */ = { - isa = PBXGroup; - children = ( - 03AB922626BB254800C6DFFD /* KaBlockApp.swift */, - 036C977F273851FD00170DF1 /* Localizable.strings */, - ); - path = "iOS (App)"; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -219,7 +197,6 @@ buildActionMask = 2147483647; files = ( 03346D8226B08EA2004A268E /* Assets.xcassets in Resources */, - 036B14902BF2F4C10053AD95 /* Localizable.strings in Resources */, 036C97832738522600170DF1 /* Localizable.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -241,7 +218,6 @@ files = ( 0381081326CC50D9008A912C /* ContentBlockerState.swift in Sources */, 036A5C6E26C44E1500A76915 /* HomeScreen.swift in Sources */, - 036B14912BF2F4C30053AD95 /* KaBlockApp.swift in Sources */, 0397975D26BC86460014BF79 /* Logo.swift in Sources */, 03AB922726BB254800C6DFFD /* KaBlockApp.swift in Sources */, ); @@ -397,7 +373,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = "Shared (Extension)/Info.plist"; + INFOPLIST_FILE = Extension/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Ka-Block!"; INFOPLIST_KEY_CFBundleExecutable = "Ka-Block! Extension"; INFOPLIST_KEY_CFBundleName = "Ka-Block! Extension"; @@ -428,7 +404,7 @@ CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_FILE = "Shared (Extension)/Info.plist"; + INFOPLIST_FILE = Extension/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Ka-Block!"; INFOPLIST_KEY_CFBundleExecutable = "Ka-Block! Extension"; INFOPLIST_KEY_CFBundleName = "Ka-Block! Extension"; diff --git a/iOS (App)/KaBlockApp.swift b/iOS (App)/KaBlockApp.swift deleted file mode 100644 index f29ba27..0000000 --- a/iOS (App)/KaBlockApp.swift +++ /dev/null @@ -1,12 +0,0 @@ -import SwiftUI - -@main -struct KaBlockApp: App { - @ObservedObject var contentBlockerState = ContentBlockerState(withIdentifier: "com.kablock.ios.KaBlockContentBlocker") - - var body: some Scene { - WindowGroup { - HomeScreen(isEnabled: contentBlockerState.isEnabled) - } - } -} diff --git a/macOS (App)/KaBlockApp.swift b/macOS (App)/KaBlockApp.swift deleted file mode 100644 index 4c20b73..0000000 --- a/macOS (App)/KaBlockApp.swift +++ /dev/null @@ -1,58 +0,0 @@ -import SwiftUI - -@main -struct KaBlockApp: App { - @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate - - @ObservedObject var contentBlockerState = ContentBlockerState(withIdentifier: "com.kablock.ios.KaBlockContentBlocker") - - var body: some Scene { - WindowGroup { - HomeScreen(isEnabled: contentBlockerState.isEnabled) - .frame(width: 375, height: 640) - .background(NonResizableWindow()) - } - .windowStyle(HiddenTitleBarWindowStyle()) - } -} - -struct NonResizableWindow: NSViewRepresentable { - func makeNSView(context _: Context) -> NSView { - let view = NSView() - DispatchQueue.main.async { - guard let window = view.window else { return } - window.styleMask = [.closable, .titled, .fullSizeContentView] - window.collectionBehavior = [.fullScreenNone] - - if let menu = window.menu { - let appMenuItem = menu.item(withTitle: "Ka-Block!")! - let fileMenuItem = menu.item(withTitle: "File")! - - menu.items = [appMenuItem, fileMenuItem] - - appMenuItem.submenu!.items = [ - appMenuItem.submenu!.item(withTitle: "About Ka-Block!")!, - NSMenuItem.separator(), - appMenuItem.submenu!.item(withTitle: "Quit Ka-Block!")!, - ] - - fileMenuItem.submenu!.items = [ - fileMenuItem.submenu!.item(withTitle: "Close")!, - ] - } - } - return view - } - - func updateNSView(_: NSView, context _: Context) {} -} - -class AppDelegate: NSObject, NSApplicationDelegate { - func applicationDidFinishLaunching(_: Notification) { - NSWindow.allowsAutomaticWindowTabbing = false - } - - func applicationShouldTerminateAfterLastWindowClosed(_: NSApplication) -> Bool { - true - } -} diff --git a/macOS (App)/Localizable.strings b/macOS (App)/Localizable.strings deleted file mode 100644 index be421e1..0000000 --- a/macOS (App)/Localizable.strings +++ /dev/null @@ -1,2 +0,0 @@ -"instructions-enabled" = "Ad blocking is enabled.\nYou’re all set!"; -"instructions-disabled" = "Enable Ka-Block! in\nSettings → Safari → Extensions\nto enjoy a faster web."; From f912befa3ae6b0fc700675d379d1d03f85aa02c6 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 13 May 2024 18:51:37 -0700 Subject: [PATCH 07/10] Remove hacks and now just use windowResizability --- App/KaBlockApp.swift | 67 ++++-------------------------- Ka-Block.xcodeproj/project.pbxproj | 4 +- 2 files changed, 11 insertions(+), 60 deletions(-) diff --git a/App/KaBlockApp.swift b/App/KaBlockApp.swift index 1e4b585..d64736a 100644 --- a/App/KaBlockApp.swift +++ b/App/KaBlockApp.swift @@ -4,65 +4,16 @@ import SwiftUI struct KaBlockApp: App { @ObservedObject var contentBlockerState = ContentBlockerState(withIdentifier: "com.kablock.ios.KaBlockContentBlocker") - #if os(macOS) - @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate - #endif - var body: some Scene { - #if os(iOS) - WindowGroup { - HomeScreen(isEnabled: contentBlockerState.isEnabled) - } - #elseif os(macOS) - WindowGroup { - HomeScreen(isEnabled: contentBlockerState.isEnabled) - .frame(width: 375, height: 640) - .background(NonResizableWindow()) - } - .windowStyle(HiddenTitleBarWindowStyle()) + WindowGroup { + HomeScreen(isEnabled: contentBlockerState.isEnabled) + #if os(macOS) + .frame(width: 375, height: 640) + #endif + } + #if os(macOS) + .windowResizability(.contentSize) + .windowStyle(.hiddenTitleBar) #endif } } - -#if os(macOS) - struct NonResizableWindow: NSViewRepresentable { - func makeNSView(context _: Context) -> NSView { - let view = NSView() - DispatchQueue.main.async { - guard let window = view.window else { return } - window.styleMask = [.closable, .titled, .fullSizeContentView] - window.collectionBehavior = [.fullScreenNone] - - if let menu = window.menu { - let appMenuItem = menu.item(withTitle: "Ka-Block!")! - let fileMenuItem = menu.item(withTitle: "File")! - - menu.items = [appMenuItem, fileMenuItem] - - appMenuItem.submenu!.items = [ - appMenuItem.submenu!.item(withTitle: "About Ka-Block!")!, - NSMenuItem.separator(), - appMenuItem.submenu!.item(withTitle: "Quit Ka-Block!")!, - ] - - fileMenuItem.submenu!.items = [ - fileMenuItem.submenu!.item(withTitle: "Close")!, - ] - } - } - return view - } - - func updateNSView(_: NSView, context _: Context) {} - } - - class AppDelegate: NSObject, NSApplicationDelegate { - func applicationDidFinishLaunching(_: Notification) { - NSWindow.allowsAutomaticWindowTabbing = false - } - - func applicationShouldTerminateAfterLastWindowClosed(_: NSApplication) -> Bool { - true - } - } -#endif diff --git a/Ka-Block.xcodeproj/project.pbxproj b/Ka-Block.xcodeproj/project.pbxproj index 68a8161..83de230 100644 --- a/Ka-Block.xcodeproj/project.pbxproj +++ b/Ka-Block.xcodeproj/project.pbxproj @@ -298,7 +298,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MACOSX_DEPLOYMENT_TARGET = 11.0; + MACOSX_DEPLOYMENT_TARGET = 13.0; MARKETING_VERSION = 4.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -358,7 +358,7 @@ GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; IPHONEOS_DEPLOYMENT_TARGET = 14.0; - MACOSX_DEPLOYMENT_TARGET = 11.0; + MACOSX_DEPLOYMENT_TARGET = 13.0; MARKETING_VERSION = 4.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; From 3a9b822b4e8b77b2ecf00576b015f22ba635cba1 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 13 May 2024 19:37:06 -0700 Subject: [PATCH 08/10] Fix centering --- App/Logo.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/App/Logo.swift b/App/Logo.swift index 250c489..c00fef8 100644 --- a/App/Logo.swift +++ b/App/Logo.swift @@ -10,6 +10,7 @@ struct Logo: View { Circle() .stroke(stateColor, lineWidth: 0.1) + .position() Circle() .foregroundColor(Color.white) From f929298a524454d14aa675e00feceebb6035be3e Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 13 May 2024 19:47:39 -0700 Subject: [PATCH 09/10] Update extension dir --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5e02830..4678670 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,4 +11,4 @@ jobs: - uses: actions/setup-node@v2 - - run: npx prettier --check ".github/" "Shared (Extension)/blockerList.json" + - run: npx prettier --check ".github/" "Extension/blockerList.json" From 5c9257112c279a08f7a237fa3fe98acd2a577d67 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 13 May 2024 19:50:21 -0700 Subject: [PATCH 10/10] Only one scheme to build now --- .github/workflows/xcode.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/xcode.yml b/.github/workflows/xcode.yml index f72c770..6481706 100644 --- a/.github/workflows/xcode.yml +++ b/.github/workflows/xcode.yml @@ -4,13 +4,7 @@ on: [push, pull_request] jobs: build: - strategy: - matrix: - scheme: - # - "Ka-Block (iOS)" - - "Ka-Block (macOS)" - - runs-on: macos-11.0 + runs-on: macos-latest steps: - uses: actions/checkout@v1 @@ -19,4 +13,4 @@ jobs: run: xcodebuild -version -sdk - name: Build - run: xcodebuild -project Ka-Block.xcodeproj -scheme "${{ matrix.scheme }}" build ENABLE_HARDENED_RUNTIME=NO CODE_SIGN_STYLE=Manual CODE_SIGN_IDENTITY= + run: xcodebuild -project Ka-Block.xcodeproj -scheme "Ka-Block" build ENABLE_HARDENED_RUNTIME=NO CODE_SIGN_STYLE=Manual CODE_SIGN_IDENTITY=