From ea2df9f109328671a4fa1624407c5430a28fe06e Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Tue, 5 Dec 2023 20:57:02 -0800 Subject: [PATCH 1/2] Enable NetP in release builds. --- DuckDuckGo.xcodeproj/project.pbxproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index da59109997..809d7a4e9c 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -6155,7 +6155,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "# Conditionally embeds PacketTunnelProvider extension for Debug and Alpha builds.\n\n# Conditionally embeds the PacketTunnelProvider extension for debug builds.\\n# To be moved to the Embed App Extensions phase on release.\n\nif [ \"${CONFIGURATION}\" = \"Debug\" ] || [ \"${CONFIGURATION}\" = \"Alpha\" ]; then\n# Copy the extension \n rsync -r --copy-links \"${CONFIGURATION_BUILD_DIR}/PacketTunnelProvider.appex\" \"${CONFIGURATION_BUILD_DIR}/${PLUGINS_FOLDER_PATH}\"\nfi\n"; + shellScript = "# Conditionally embeds PacketTunnelProvider extension for Debug and Alpha builds.\n\n# Conditionally embeds the PacketTunnelProvider extension for debug builds.\\n# To be moved to the Embed App Extensions phase on release.\n\nif [ \"${CONFIGURATION}\" = \"Debug\" ] || [ \"${CONFIGURATION}\" = \"Release\" ] || [ \"${CONFIGURATION}\" = \"Alpha\" ]; then\n# Copy the extension \n rsync -r --copy-links \"${CONFIGURATION_BUILD_DIR}/PacketTunnelProvider.appex\" \"${CONFIGURATION_BUILD_DIR}/${PLUGINS_FOLDER_PATH}\"\nfi\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -8162,6 +8162,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = NETWORK_PROTECTION; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; TARGETED_DEVICE_FAMILY = "1,2"; From e5fac5c768369474cdeeb0de11558f5c5c699b8b Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Tue, 5 Dec 2023 20:57:21 -0800 Subject: [PATCH 2/2] Wire up NetP feature flags to the privacy config. --- Core/FeatureFlag.swift | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Core/FeatureFlag.swift b/Core/FeatureFlag.swift index 2f0819907d..dfe79f7d48 100644 --- a/Core/FeatureFlag.swift +++ b/Core/FeatureFlag.swift @@ -39,8 +39,14 @@ public enum FeatureFlag: String { extension FeatureFlag: FeatureFlagSourceProviding { public var source: FeatureFlagSource { switch self { - case .debugMenu, .sync, .appTrackingProtection, .networkProtection, .networkProtectionWaitlistAccess, .networkProtectionWaitlistActive: + case .debugMenu, .sync, .appTrackingProtection: return .internalOnly + case .networkProtection: + return .remoteReleasable(.feature(.networkProtection)) + case .networkProtectionWaitlistAccess: + return .remoteReleasable(.subfeature(NetworkProtectionSubfeature.waitlist)) + case .networkProtectionWaitlistActive: + return .remoteReleasable(.subfeature(NetworkProtectionSubfeature.waitlistBetaActive)) case .autofillCredentialInjecting: return .remoteReleasable(.subfeature(AutofillSubfeature.credentialsAutofill)) case .autofillCredentialsSaving: