Skip to content

Commit

Permalink
Enable NetP in production builds (#2232)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/0/1206108886603214/f
Tech Design URL:
CC:

Description:

This PR enables NetP in production.

I am deliberately keeping the NETWORK_PROTECTION flag in place for now in the off chance that something comes up in review that prevents this from shipping, we need to have the ability to shut it off if necessary.
  • Loading branch information
samsymons authored Dec 9, 2023
1 parent 8bbc638 commit b2d8f64
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Core/FeatureFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -6122,7 +6122,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 */

Expand Down Expand Up @@ -8102,6 +8102,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";
Expand Down

0 comments on commit b2d8f64

Please sign in to comment.