Skip to content

Commit

Permalink
Add alpha specific app groups (#1934)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/0/1205332058642473/f

Description:

This is needed to fix a potential problem when running the prod + Alpha builds side by side. If we don’t separate the app groups, we would end up sharing state between the two which could introduce problems when we change schema between releases.
  • Loading branch information
graeme authored Aug 23, 2023
1 parent 25d7a99 commit 71763ff
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 3 deletions.
12 changes: 9 additions & 3 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2301,6 +2301,9 @@
EE0153EE2A70021E002A8B26 /* NetworkProtectionInviteView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkProtectionInviteView.swift; sourceTree = "<group>"; };
EE276BE92A77F823009167B6 /* NetworkProtectionRootViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkProtectionRootViewController.swift; sourceTree = "<group>"; };
EE3B226A29DE0F110082298A /* MockInternalUserStoring.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockInternalUserStoring.swift; sourceTree = "<group>"; };
EE3B98EA2A9634CC002F63A0 /* DuckDuckGoAlpha.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DuckDuckGoAlpha.entitlements; sourceTree = "<group>"; };
EE3B98EB2A963515002F63A0 /* WidgetsExtensionAlpha.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = WidgetsExtensionAlpha.entitlements; sourceTree = "<group>"; };
EE3B98EC2A963538002F63A0 /* PacketTunnelProviderAlpha.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = PacketTunnelProviderAlpha.entitlements; sourceTree = "<group>"; };
EE41BD182A729E9C00546C57 /* NetworkProtectionInviteViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkProtectionInviteViewModelTests.swift; sourceTree = "<group>"; };
EE4BE0082A740BED00CD6AA8 /* ClearTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClearTextField.swift; sourceTree = "<group>"; };
EE4FB1852A28CE7200E5CBA7 /* NetworkProtectionStatusView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkProtectionStatusView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2565,6 +2568,7 @@
02025665298818B200E694E7 /* PacketTunnelProvider */ = {
isa = PBXGroup;
children = (
EE3B98EC2A963538002F63A0 /* PacketTunnelProviderAlpha.entitlements */,
02025670298818CB00E694E7 /* ProxyServer */,
02025666298818B200E694E7 /* AppTrackingProtectionPacketTunnelProvider.swift */,
02025B1429884EA500E694E7 /* DDGObserverFactory.swift */,
Expand Down Expand Up @@ -3457,6 +3461,7 @@
84E341891E2F7EFB00BDBA6F = {
isa = PBXGroup;
children = (
EE3B98EB2A963515002F63A0 /* WidgetsExtensionAlpha.entitlements */,
6FB030C7234331B400A10DB9 /* Configuration.xcconfig */,
84E341941E2F7EFB00BDBA6F /* DuckDuckGo */,
F143C2E51E4A4CD400CFDE3A /* Core */,
Expand Down Expand Up @@ -3501,6 +3506,7 @@
84E341941E2F7EFB00BDBA6F /* DuckDuckGo */ = {
isa = PBXGroup;
children = (
EE3B98EA2A9634CC002F63A0 /* DuckDuckGoAlpha.entitlements */,
CB258D1129A4F1BB00DEBA24 /* Configuration */,
1E908BED29827C480008C8F3 /* Autoconsent */,
3157B43627F4C8380042D3D7 /* Favicons */,
Expand Down Expand Up @@ -8241,7 +8247,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = "DDG-AppIcon-Alpha";
CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGo.entitlements;
CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGoAlpha.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CURRENT_PROJECT_VERSION = 0;
Expand Down Expand Up @@ -8335,7 +8341,7 @@
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = Widgets/WidgetsExtension.entitlements;
CODE_SIGN_ENTITLEMENTS = WidgetsExtensionAlpha.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
Expand Down Expand Up @@ -8371,7 +8377,7 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = PacketTunnelProvider/PacketTunnelProvider.entitlements;
CODE_SIGN_ENTITLEMENTS = PacketTunnelProvider/PacketTunnelProviderAlpha.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
Expand Down
21 changes: 21 additions & 0 deletions DuckDuckGo/DuckDuckGoAlpha.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.networking.networkextension</key>
<array>
<string>packet-tunnel-provider</string>
</array>
<key>com.apple.developer.web-browser</key>
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.duckduckgo.alpha.apptp</string>
<string>group.com.duckduckgo.alpha.bookmarks</string>
<string>group.com.duckduckgo.alpha.contentblocker</string>
<string>group.com.duckduckgo.alpha.database</string>
<string>group.com.duckduckgo.alpha.netp</string>
<string>group.com.duckduckgo.alpha.statistics</string>
</array>
</dict>
</plist>
15 changes: 15 additions & 0 deletions PacketTunnelProvider/PacketTunnelProviderAlpha.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.networking.networkextension</key>
<array>
<string>packet-tunnel-provider</string>
</array>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.duckduckgo.alpha.apptp</string>
<string>group.com.duckduckgo.alpha.netp</string>
</array>
</dict>
</plist>
11 changes: 11 additions & 0 deletions WidgetsExtensionAlpha.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.duckduckgo.alpha.database</string>
<string>group.com.duckduckgo.alpha.bookmarks</string>
</array>
</dict>
</plist>

0 comments on commit 71763ff

Please sign in to comment.