Skip to content

Commit

Permalink
App Configuration app group (#3132)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/72649045549333/1208093694357910/f
Tech Design URL:
CC:

Description:

This PR adds a new APP_CONFIGURATION_APP_GROUP app group, for storing configuration files. It is supported by all targets, including the system extension.
  • Loading branch information
samsymons authored Aug 22, 2024
1 parent 6c87822 commit 06c7d73
Show file tree
Hide file tree
Showing 26 changed files with 47 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Configuration/AppStore.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ SUBSCRIPTION_APP_GROUP[config=Review][sdk=*] = $(SUBSCRIPTION_BASE_APP_GROUP).re
SUBSCRIPTION_APP_GROUP[config=Debug][sdk=*] = $(SUBSCRIPTION_BASE_APP_GROUP).debug
SUBSCRIPTION_APP_GROUP[config=Release][sdk=*] = $(SUBSCRIPTION_BASE_APP_GROUP)

APP_CONFIGURATION_BASE_APP_GROUP = $(DEVELOPMENT_TEAM).$(MAIN_BUNDLE_IDENTIFIER_PREFIX).app-configuration
APP_CONFIGURATION_APP_GROUP[config=CI][sdk=*] = $(APP_CONFIGURATION_BASE_APP_GROUP).debug
APP_CONFIGURATION_APP_GROUP[config=Review][sdk=*] = $(APP_CONFIGURATION_BASE_APP_GROUP).review
APP_CONFIGURATION_APP_GROUP[config=Debug][sdk=*] = $(APP_CONFIGURATION_BASE_APP_GROUP).debug
APP_CONFIGURATION_APP_GROUP[config=Release][sdk=*] = $(APP_CONFIGURATION_BASE_APP_GROUP)

AGENT_BUNDLE_ID_BASE[sdk=*] = com.duckduckgo.mobile.ios.vpn.agent
AGENT_BUNDLE_ID[sdk=*] = $(AGENT_BUNDLE_ID_BASE)
AGENT_BUNDLE_ID[config=Debug][sdk=*] = $(AGENT_BUNDLE_ID_BASE).debug
Expand Down
6 changes: 6 additions & 0 deletions Configuration/DeveloperID.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ SUBSCRIPTION_APP_GROUP[config=Review][sdk=*] = $(SUBSCRIPTION_BASE_APP_GROUP).re
SUBSCRIPTION_APP_GROUP[config=Debug][sdk=*] = $(SUBSCRIPTION_BASE_APP_GROUP).debug
SUBSCRIPTION_APP_GROUP[config=Release][sdk=*] = $(SUBSCRIPTION_BASE_APP_GROUP)

APP_CONFIGURATION_BASE_APP_GROUP = $(DEVELOPMENT_TEAM).$(MAIN_BUNDLE_IDENTIFIER_PREFIX).app-configuration
APP_CONFIGURATION_APP_GROUP[config=CI][sdk=*] = $(APP_CONFIGURATION_BASE_APP_GROUP).debug
APP_CONFIGURATION_APP_GROUP[config=Review][sdk=*] = $(APP_CONFIGURATION_BASE_APP_GROUP).review
APP_CONFIGURATION_APP_GROUP[config=Debug][sdk=*] = $(APP_CONFIGURATION_BASE_APP_GROUP).debug
APP_CONFIGURATION_APP_GROUP[config=Release][sdk=*] = $(APP_CONFIGURATION_BASE_APP_GROUP)

SYSEX_MACH_SERVICE_NAME[sdk=*] = $(NETP_APP_GROUP).ipc
SYSEX_MACH_SERVICE_NAME[config=CI][sdk=*] = $(NETP_APP_GROUP).ipc
SYSEX_MACH_SERVICE_NAME[config=Review][sdk=*] = $(NETP_APP_GROUP).ipc
Expand Down
3 changes: 3 additions & 0 deletions DuckDuckGo/Common/Extensions/BundleExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ enum BundleGroup {
case ipc
case dbp
case subs
case appConfiguration

var appGroupKey: String {
switch self {
Expand All @@ -153,6 +154,8 @@ enum BundleGroup {
return "NETP_APP_GROUP"
case .subs:
return "SUBSCRIPTION_APP_GROUP"
case .appConfiguration:
return "APP_CONFIGURATION_APP_GROUP"
}
}
}
1 change: 1 addition & 0 deletions DuckDuckGo/Common/Utilities/UserDefaultsWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ extension UserDefaults {
static let netP = UserDefaults(suiteName: Bundle.main.appGroup(bundle: .netP))!
static let dbp = UserDefaults(suiteName: Bundle.main.appGroup(bundle: .dbp))!
static let subs = UserDefaults(suiteName: Bundle.main.appGroup(bundle: .subs))!
static let appConfiguration = UserDefaults(suiteName: Bundle.main.appGroup(bundle: .appConfiguration))!
}

public struct UserDefaultsWrapperKey: RawRepresentable {
Expand Down
1 change: 1 addition & 0 deletions DuckDuckGo/DuckDuckGo.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<string>$(DBP_APP_GROUP)</string>
<string>$(NETP_APP_GROUP)</string>
<string>$(SUBSCRIPTION_APP_GROUP)</string>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</array>
<key>com.apple.security.device.audio-input</key>
<true/>
Expand Down
1 change: 1 addition & 0 deletions DuckDuckGo/DuckDuckGoAppStore.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<string>$(DBP_APP_GROUP)</string>
<string>$(NETP_APP_GROUP)</string>
<string>$(SUBSCRIPTION_APP_GROUP)</string>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</array>
<key>com.apple.security.device.audio-input</key>
<true/>
Expand Down
1 change: 1 addition & 0 deletions DuckDuckGo/DuckDuckGoAppStoreCI.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<string>$(NETP_APP_GROUP)</string>
<string>$(DBP_APP_GROUP)</string>
<string>$(SUBSCRIPTION_APP_GROUP)</string>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</array>
<key>com.apple.security.device.audio-input</key>
<true/>
Expand Down
1 change: 1 addition & 0 deletions DuckDuckGo/DuckDuckGoAppStoreDebug.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<string>$(DBP_APP_GROUP)</string>
<string>$(NETP_APP_GROUP)</string>
<string>$(SUBSCRIPTION_APP_GROUP)</string>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</array>
<key>com.apple.security.device.audio-input</key>
<true/>
Expand Down
1 change: 1 addition & 0 deletions DuckDuckGo/DuckDuckGoDebug.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<string>$(DBP_APP_GROUP)</string>
<string>$(NETP_APP_GROUP)</string>
<string>$(SUBSCRIPTION_APP_GROUP)</string>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</array>
<key>com.apple.security.device.audio-input</key>
<true/>
Expand Down
2 changes: 2 additions & 0 deletions DuckDuckGo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,8 @@
<integer>10800</integer>
<key>ViewBridgeService</key>
<false/>
<key>APP_CONFIGURATION_APP_GROUP</key>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
<key>IPC_APP_GROUP</key>
<string>$(IPC_APP_GROUP)</string>
</dict>
Expand Down
1 change: 1 addition & 0 deletions DuckDuckGo/NetworkProtectionAppExtension.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<array>
<string>$(SUBSCRIPTION_APP_GROUP)</string>
<string>$(NETP_APP_GROUP)</string>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</array>
<key>com.apple.security.network.client</key>
<true/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<array>
<string>$(DBP_APP_GROUP)</string>
<string>$(NETP_APP_GROUP)</string>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
<string>$(SUBSCRIPTION_APP_GROUP)</string>
</array>
<key>keychain-access-groups</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<string>$(DBP_APP_GROUP)</string>
<string>$(NETP_APP_GROUP)</string>
<string>$(SUBSCRIPTION_APP_GROUP)</string>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</array>
<key>com.apple.security.network.client</key>
<true/>
Expand Down
2 changes: 2 additions & 0 deletions DuckDuckGoDBPBackgroundAgent/Info-AppStore.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@
</dict>
<key>SUBSCRIPTION_APP_GROUP</key>
<string>$(SUBSCRIPTION_APP_GROUP)</string>
<key>APP_CONFIGURATION_APP_GROUP</key>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</dict>
</plist>
2 changes: 2 additions & 0 deletions DuckDuckGoDBPBackgroundAgent/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@
</dict>
<key>SUBSCRIPTION_APP_GROUP</key>
<string>$(SUBSCRIPTION_APP_GROUP)</string>
<key>APP_CONFIGURATION_APP_GROUP</key>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</dict>
</plist>
2 changes: 2 additions & 0 deletions DuckDuckGoDBPTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@
<string>1</string>
<key>DBP_APP_GROUP</key>
<string>$(DBP_APP_GROUP)</string>
<key>APP_CONFIGURATION_APP_GROUP</key>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</dict>
</plist>
1 change: 1 addition & 0 deletions DuckDuckGoVPN/DuckDuckGoVPN.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<string>$(NETP_APP_GROUP)</string>
<string>$(IPC_APP_GROUP)</string>
<string>$(SUBSCRIPTION_APP_GROUP)</string>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</array>
<key>keychain-access-groups</key>
<array>
Expand Down
1 change: 1 addition & 0 deletions DuckDuckGoVPN/DuckDuckGoVPNAppStore.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<string>$(IPC_APP_GROUP)</string>
<string>$(SUBSCRIPTION_APP_GROUP)</string>
<string>$(NETP_APP_GROUP)</string>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</array>
</dict>
</plist>
2 changes: 2 additions & 0 deletions DuckDuckGoVPN/Info-AppStore.plist
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@
<string>$(MARKETING_VERSION)</string>
<key>IPC_APP_GROUP</key>
<string>$(IPC_APP_GROUP)</string>
<key>APP_CONFIGURATION_APP_GROUP</key>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</dict>
</plist>
2 changes: 2 additions & 0 deletions DuckDuckGoVPN/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@
<string>public.app-category.productivity</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>APP_CONFIGURATION_APP_GROUP</key>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</dict>
</plist>
2 changes: 2 additions & 0 deletions NetworkProtectionAppExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@
</dict>
<key>SUBSCRIPTION_APP_GROUP</key>
<string>$(SUBSCRIPTION_APP_GROUP)</string>
<key>APP_CONFIGURATION_APP_GROUP</key>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</dict>
</plist>
2 changes: 2 additions & 0 deletions NetworkProtectionSystemExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<string>$(DISTRIBUTED_NOTIFICATIONS_PREFIX)</string>
<key>NETP_APP_GROUP</key>
<string>$(NETP_APP_GROUP)</string>
<key>APP_CONFIGURATION_APP_GROUP</key>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
<key>NetworkExtension</key>
<dict>
<key>NEMachServiceName</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<array>
<string>$(SUBSCRIPTION_APP_GROUP)</string>
<string>$(NETP_APP_GROUP)</string>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</array>
<key>com.apple.security.network.client</key>
<true/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<array>
<string>$(SUBSCRIPTION_APP_GROUP)</string>
<string>$(NETP_APP_GROUP)</string>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</array>
<key>com.apple.security.network.client</key>
<true/>
Expand Down
2 changes: 2 additions & 0 deletions VPNProxyExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<string>$(DISTRIBUTED_NOTIFICATIONS_PREFIX)</string>
<key>NETP_APP_GROUP</key>
<string>$(NETP_APP_GROUP)</string>
<key>APP_CONFIGURATION_APP_GROUP</key>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
1 change: 1 addition & 0 deletions VPNProxyExtension/VPNProxyExtension.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<array>
<string>$(NETP_APP_GROUP)</string>
<string>$(SUBSCRIPTION_APP_GROUP)</string>
<string>$(APP_CONFIGURATION_APP_GROUP)</string>
</array>
<key>com.apple.security.network.client</key>
<true/>
Expand Down

0 comments on commit 06c7d73

Please sign in to comment.