Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBP background agent #1751

Merged
merged 99 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
31d332b
Move LoginItem to its own package
THISISDINOSAUR Sep 1, 2023
dd303d0
Remove comments that shouldn't exist
THISISDINOSAUR Sep 1, 2023
83a7ea6
Fix import
THISISDINOSAUR Sep 1, 2023
77bda2c
Make NetworkProtectionLoginItemsManager more generic
THISISDINOSAUR Sep 5, 2023
ecdfc51
Rename LoginItem
THISISDINOSAUR Sep 5, 2023
4fdde3f
Merge branch 'develop' into elle/generlise-LoginItemManager
THISISDINOSAUR Sep 5, 2023
facc095
Fix wonky merge
THISISDINOSAUR Sep 5, 2023
f69324a
Add necessary Logging and BundleExtension items for DBP background agent
THISISDINOSAUR Sep 7, 2023
4a8f85f
Add initial DBP background agent targets
THISISDINOSAUR Sep 7, 2023
5162901
Add basic loginItem files
THISISDINOSAUR Sep 8, 2023
e18923d
Try and convince xcode to use the right entitlement files
THISISDINOSAUR Sep 8, 2023
87f5aae
Make xcode use the right entitlements file
THISISDINOSAUR Sep 8, 2023
9905528
Start DBP baby
THISISDINOSAUR Sep 8, 2023
60dbe55
Merge in develop
THISISDINOSAUR Sep 8, 2023
a873820
Update background manager with changes from develop
THISISDINOSAUR Sep 8, 2023
33dc76a
Add preprocessor flags to agent targets
THISISDINOSAUR Sep 11, 2023
28c0f9e
Add app group entitlements to DBP
THISISDINOSAUR Sep 11, 2023
c4cc870
Make DBP use app group
THISISDINOSAUR Sep 11, 2023
9360bf0
Make keychain use app group and data protection keychain
THISISDINOSAUR Sep 12, 2023
4f1a6f6
Add scan of all brokers when agent starts to test things
THISISDINOSAUR Sep 12, 2023
6ee74f0
Add better privacy config mock
THISISDINOSAUR Sep 28, 2023
5c4879a
Add background agent OSLog items
THISISDINOSAUR Sep 28, 2023
35e1938
Add initial IPC connection
THISISDINOSAUR Sep 28, 2023
de92bb5
Add background agent infor to DuckDuckGoDBP.xcconfig
THISISDINOSAUR Sep 28, 2023
909f5e4
Add things to project
THISISDINOSAUR Sep 28, 2023
1a7693a
Correct type
THISISDINOSAUR Sep 28, 2023
936d83f
Add things to input files checkeer
THISISDINOSAUR Sep 28, 2023
b6dc50d
Initial attempt to start login item from app
THISISDINOSAUR Sep 28, 2023
bb176e2
Remove login item import from main app since it doesn't work
THISISDINOSAUR Sep 29, 2023
0d21f53
Add pixel kit dependency to background agent
THISISDINOSAUR Sep 29, 2023
97346ad
Stub out IPC methods on the agent side
THISISDINOSAUR Sep 29, 2023
5c67544
Add app to agent method stubs
THISISDINOSAUR Sep 29, 2023
38233fd
Add brokersScanCompleted method
THISISDINOSAUR Sep 29, 2023
ac7805a
Add brokers scan completed callbacks
THISISDINOSAUR Sep 29, 2023
c487b40
Rearrange testing code so main app callback is called
THISISDINOSAUR Sep 29, 2023
585e467
Add call to AppDidStart
THISISDINOSAUR Sep 29, 2023
ec79c4c
Add comment
THISISDINOSAUR Sep 29, 2023
4064a98
Fix error
THISISDINOSAUR Sep 29, 2023
d964d3f
Move app IPC handling to DataBrokerProtectionManager in order to be l…
THISISDINOSAUR Sep 29, 2023
ed5c13c
Add initial main app to dbp package interface
THISISDINOSAUR Sep 29, 2023
a895699
Fix machName not being dynamic
THISISDINOSAUR Sep 30, 2023
d33c85c
Add main app to dbp package delegate and remove scheduler where no lo…
THISISDINOSAUR Sep 30, 2023
4946ef0
Remove scheduler method call that shouldn't be in ContainerView
THISISDINOSAUR Oct 2, 2023
e28eeaa
Remove unnecessary import in appdelegate
THISISDINOSAUR Oct 2, 2023
216681b
Merge in develop
THISISDINOSAUR Oct 3, 2023
68cacd3
Update containerViewModel
THISISDINOSAUR Oct 3, 2023
3ff3122
Fixes building issues for DBP. (#1713)
diegoreymendez Oct 4, 2023
f7258cd
Updates BSK
diegoreymendez Oct 11, 2023
6ec80b8
Updates DBP
diegoreymendez Oct 11, 2023
b0db77d
Merges the latest from develop
diegoreymendez Oct 11, 2023
cdb5250
Merges BSK
diegoreymendez Oct 11, 2023
d5006f4
Updates BSK
diegoreymendez Oct 11, 2023
d054a55
The DBP target builds again
diegoreymendez Oct 12, 2023
e48f828
Merged the latest from develop
diegoreymendez Oct 12, 2023
ee42bf7
Implements DBP's XPC through XPCHelper
diegoreymendez Oct 12, 2023
355f1e7
First version of full IPC support in the agent app
diegoreymendez Oct 12, 2023
81a325d
Agent is started and stopped correctly
diegoreymendez Oct 12, 2023
17c3263
The DBP background agent now properly communicates through IPC
diegoreymendez Oct 13, 2023
3d32e5e
Removes some unused code
diegoreymendez Oct 13, 2023
bc10840
WIP
diegoreymendez Oct 13, 2023
75b4e57
swiftlint --fix
diegoreymendez Oct 17, 2023
26887c2
Merges the latest from develop
diegoreymendez Oct 17, 2023
42f8d5c
Shows results
diegoreymendez Oct 17, 2023
9abda18
Removes some commented code
diegoreymendez Oct 17, 2023
99296d0
WIP
diegoreymendez Oct 17, 2023
52a8c1b
Changed DBP pixels to rely on PixelKit
diegoreymendez Oct 18, 2023
9ccb8d0
Adds some validation tests for DBP pixels
diegoreymendez Oct 18, 2023
092758a
Adds PixelKitTestingUtilities
diegoreymendez Oct 18, 2023
9b0e91c
Improves the DBP pixel tests to include debug pixels
diegoreymendez Oct 18, 2023
15fcee4
WIP
diegoreymendez Oct 18, 2023
2cde7fb
Improves DataBrokerProtectionPixelTests.swift
diegoreymendez Oct 18, 2023
b5fb414
Resolves the merge conflicts
diegoreymendez Oct 18, 2023
31d52c0
Removes an unnecessary file
diegoreymendez Oct 18, 2023
2c27996
Removes an unintentional change to the project file
diegoreymendez Oct 18, 2023
5301f5b
Merges the latest from diego/change-dbp-pixels-to-use-pixelkit
diegoreymendez Oct 18, 2023
90d2c96
Improves PixelKit
diegoreymendez Oct 18, 2023
c1c4455
Merges the latest from develop
diegoreymendez Oct 19, 2023
5dfafca
Removes an unnecessary todo
diegoreymendez Oct 19, 2023
934034f
Removes an unintentional change
diegoreymendez Oct 19, 2023
5ca17f4
Resolving swiftlint warnings
diegoreymendez Oct 19, 2023
8fcb275
swiftlint --fix
diegoreymendez Oct 19, 2023
c90f918
Fixes a bug
diegoreymendez Oct 19, 2023
e80fd3a
Rolls back the local packages
diegoreymendez Oct 19, 2023
7e9da75
Fixes a build issue with the tests
diegoreymendez Oct 19, 2023
4239e54
Updates BSK
diegoreymendez Oct 19, 2023
296daee
Fixes project configuration and PixelKit unit tests
diegoreymendez Oct 20, 2023
5334a9a
Merges the latest from develop
diegoreymendez Oct 20, 2023
1c67983
Merges the latest BSK
diegoreymendez Oct 20, 2023
33699fc
Adds CI support for the new DBP background agent. (#1779)
diegoreymendez Oct 20, 2023
8f746a1
Merges the latest from develop
diegoreymendez Oct 22, 2023
9d8efb8
Fixes some final DBP issues
diegoreymendez Oct 22, 2023
e20527c
Updates packages.resolved
diegoreymendez Oct 22, 2023
8a40f9f
Merge branch 'develop' into diego/feature/dbp-background-agent
diegoreymendez Oct 22, 2023
1edb5a8
Merged the latest from develop
diegoreymendez Oct 30, 2023
4381a39
Fixes the entitlements
diegoreymendez Oct 30, 2023
216b712
Removed the local content scope scripts reference
diegoreymendez Oct 30, 2023
0454ef1
Fixes Package.resolved hopefully
diegoreymendez Oct 30, 2023
89ff162
Updates BSK
diegoreymendez Oct 30, 2023
ad7fd16
Fixes some tests to work well for release builds
diegoreymendez Oct 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/actions/install-certs-and-profiles/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ inputs:
RELEASE_PROVISION_PROFILE_BASE64:
required: true
type: string
DBP_AGENT_RELEASE_PROVISION_PROFILE_BASE64:
required: true
type: string
DBP_AGENT_REVIEW_PROVISION_PROFILE_BASE64:
required: true
type: string
NETP_SYSEX_RELEASE_PROVISION_PROFILE_BASE64:
required: true
type: string
Expand Down Expand Up @@ -55,6 +61,8 @@ runs:
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
REVIEW_PP_PATH=$RUNNER_TEMP/review_pp.provisionprofile
RELEASE_PP_PATH=$RUNNER_TEMP/release_pp.provisionprofile
DBP_AGENT_RELEASE_PP_PATH=$RUNNER_TEMP/dbp_agent_release_pp.provisionprofile
DBP_AGENT_REVIEW_PP_PATH=$RUNNER_TEMP/dbp_agent_review_pp.provisionprofile
NETP_SYSEX_RELEASE_PP_PATH=$RUNNER_TEMP/netp_sysex_release_pp.provisionprofile
NETP_SYSEX_REVIEW_PP_PATH=$RUNNER_TEMP/netp_sysex_review_pp.provisionprofile
NETP_AGENT_RELEASE_PP_PATH=$RUNNER_TEMP/netp_agent_release_pp.provisionprofile
Expand All @@ -66,6 +74,8 @@ runs:
echo -n "${{ inputs.BUILD_CERTIFICATE_BASE64 }}" | base64 --decode -o $CERTIFICATE_PATH
echo -n "${{ inputs.REVIEW_PROVISION_PROFILE_BASE64 }}" | base64 --decode -o $REVIEW_PP_PATH
echo -n "${{ inputs.RELEASE_PROVISION_PROFILE_BASE64 }}" | base64 --decode -o $RELEASE_PP_PATH
echo -n "${{ inputs.DBP_AGENT_RELEASE_PROVISION_PROFILE_BASE64 }}" | base64 --decode -o $DBP_AGENT_RELEASE_PP_PATH
echo -n "${{ inputs.DBP_AGENT_REVIEW_PROVISION_PROFILE_BASE64 }}" | base64 --decode -o $DBP_AGENT_REVIEW_PP_PATH
echo -n "${{ inputs.NETP_SYSEX_RELEASE_PROVISION_PROFILE_BASE64 }}" | base64 --decode -o $NETP_SYSEX_RELEASE_PP_PATH
echo -n "${{ inputs.NETP_SYSEX_REVIEW_PROVISION_PROFILE_BASE64 }}" | base64 --decode -o $NETP_SYSEX_REVIEW_PP_PATH
echo -n "${{ inputs.NETP_AGENT_RELEASE_PROVISION_PROFILE_BASE64 }}" | base64 --decode -o $NETP_AGENT_RELEASE_PP_PATH
Expand All @@ -86,6 +96,8 @@ runs:
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp $REVIEW_PP_PATH \
$RELEASE_PP_PATH \
$DBP_AGENT_RELEASE_PP_PATH \
$DBP_AGENT_REVIEW_PP_PATH \
$NETP_SYSEX_RELEASE_PP_PATH \
$NETP_SYSEX_REVIEW_PP_PATH \
$NETP_AGENT_RELEASE_PP_PATH \
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build_notarized.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ on:
required: true
RELEASE_PROVISION_PROFILE_BASE64:
required: true
DBP_AGENT_RELEASE_PROVISION_PROFILE_BASE64:
required: true
DBP_AGENT_REVIEW_PROVISION_PROFILE_BASE64:
required: true
NETP_SYSEX_RELEASE_PROVISION_PROFILE_BASE64_V2:
required: true
NETP_SYSEX_REVIEW_PROVISION_PROFILE_BASE64_V2:
Expand Down Expand Up @@ -115,6 +119,8 @@ jobs:
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
REVIEW_PROVISION_PROFILE_BASE64: ${{ secrets.REVIEW_PROVISION_PROFILE_BASE64 }}
RELEASE_PROVISION_PROFILE_BASE64: ${{ secrets.RELEASE_PROVISION_PROFILE_BASE64 }}
DBP_AGENT_RELEASE_PROVISION_PROFILE_BASE64: ${{ secrets.DBP_AGENT_RELEASE_PROVISION_PROFILE_BASE64 }}
DBP_AGENT_REVIEW_PROVISION_PROFILE_BASE64: ${{ secrets.DBP_AGENT_REVIEW_PROVISION_PROFILE_BASE64 }}
NETP_SYSEX_RELEASE_PROVISION_PROFILE_BASE64: ${{ secrets.NETP_SYSEX_RELEASE_PROVISION_PROFILE_BASE64_V2 }}
NETP_SYSEX_REVIEW_PROVISION_PROFILE_BASE64: ${{ secrets.NETP_SYSEX_REVIEW_PROVISION_PROFILE_BASE64_V2 }}
NETP_AGENT_RELEASE_PROVISION_PROFILE_BASE64: ${{ secrets.NETP_AGENT_RELEASE_PROVISION_PROFILE_BASE64_V2 }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/create_variants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ jobs:
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
REVIEW_PROVISION_PROFILE_BASE64: ${{ secrets.REVIEW_PROVISION_PROFILE_BASE64 }}
RELEASE_PROVISION_PROFILE_BASE64: ${{ secrets.RELEASE_PROVISION_PROFILE_BASE64 }}
DBP_AGENT_RELEASE_PROVISION_PROFILE_BASE64: ${{ secrets.DBP_AGENT_RELEASE_PROVISION_PROFILE_BASE64 }}
DBP_AGENT_REVIEW_PROVISION_PROFILE_BASE64: ${{ secrets.DBP_AGENT_REVIEW_PROVISION_PROFILE_BASE64 }}
NETP_SYSEX_RELEASE_PROVISION_PROFILE_BASE64: ${{ secrets.NETP_SYSEX_RELEASE_PROVISION_PROFILE_BASE64_V2 }}
NETP_SYSEX_REVIEW_PROVISION_PROFILE_BASE64: ${{ secrets.NETP_SYSEX_REVIEW_PROVISION_PROFILE_BASE64_V2 }}
NETP_AGENT_RELEASE_PROVISION_PROFILE_BASE64: ${{ secrets.NETP_AGENT_RELEASE_PROVISION_PROFILE_BASE64_V2 }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ jobs:
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
REVIEW_PROVISION_PROFILE_BASE64: ${{ secrets.REVIEW_PROVISION_PROFILE_BASE64 }}
RELEASE_PROVISION_PROFILE_BASE64: ${{ secrets.RELEASE_PROVISION_PROFILE_BASE64 }}
DBP_AGENT_RELEASE_PROVISION_PROFILE_BASE64: ${{ secrets.DBP_AGENT_RELEASE_PROVISION_PROFILE_BASE64 }}
DBP_AGENT_REVIEW_PROVISION_PROFILE_BASE64: ${{ secrets.DBP_AGENT_REVIEW_PROVISION_PROFILE_BASE64 }}
NETP_SYSEX_RELEASE_PROVISION_PROFILE_BASE64: ${{ secrets.NETP_SYSEX_RELEASE_PROVISION_PROFILE_BASE64_V2 }}
NETP_SYSEX_REVIEW_PROVISION_PROFILE_BASE64: ${{ secrets.NETP_SYSEX_REVIEW_PROVISION_PROFILE_BASE64_V2 }}
NETP_AGENT_RELEASE_PROVISION_PROFILE_BASE64: ${{ secrets.NETP_AGENT_RELEASE_PROVISION_PROFILE_BASE64_V2 }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
REVIEW_PROVISION_PROFILE_BASE64: ${{ secrets.REVIEW_PROVISION_PROFILE_BASE64 }}
RELEASE_PROVISION_PROFILE_BASE64: ${{ secrets.RELEASE_PROVISION_PROFILE_BASE64 }}
DBP_AGENT_RELEASE_PROVISION_PROFILE_BASE64: ${{ secrets.DBP_AGENT_RELEASE_PROVISION_PROFILE_BASE64 }}
DBP_AGENT_REVIEW_PROVISION_PROFILE_BASE64: ${{ secrets.DBP_AGENT_REVIEW_PROVISION_PROFILE_BASE64 }}
NETP_SYSEX_RELEASE_PROVISION_PROFILE_BASE64_V2: ${{ secrets.NETP_SYSEX_RELEASE_PROVISION_PROFILE_BASE64_V2 }}
NETP_SYSEX_REVIEW_PROVISION_PROFILE_BASE64_V2: ${{ secrets.NETP_SYSEX_REVIEW_PROVISION_PROFILE_BASE64_V2 }}
NETP_AGENT_RELEASE_PROVISION_PROFILE_BASE64_V2: ${{ secrets.NETP_AGENT_RELEASE_PROVISION_PROFILE_BASE64_V2 }}
Expand Down
65 changes: 65 additions & 0 deletions Configuration/App/DBP/DuckDuckGoDBPAgent.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Copyright © 2023 DuckDuckGo. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#include "../AppTargetsBase.xcconfig"
#include "../../NetworkProtectionDeveloperID.xcconfig"

// Override AppTargetsBase.xcconfig until we resolve bundle IDs.
PRODUCT_BUNDLE_IDENTIFIER[sdk=*] = $(DBP_AGENT_BUNDLE_ID)
PRODUCT_BUNDLE_IDENTIFIER[config=Debug][sdk=*] = $(DBP_AGENT_BUNDLE_ID)
PRODUCT_BUNDLE_IDENTIFIER[config=CI][sdk=*] = $(DBP_AGENT_BUNDLE_ID)
PRODUCT_BUNDLE_IDENTIFIER[config=Review][sdk=*] = $(DBP_AGENT_BUNDLE_ID)

INFOPLIST_FILE = DuckDuckGoDBPBackgroundAgent/Info.plist
GENERATE_INFOPLIST_FILE = YES
INFOPLIST_KEY_LSUIElement = YES
INFOPLIST_KEY_NSPrincipalClass = Application

// Just make sure to override anything set by the AppTargetBase.xcconfig
//CODE_SIGN_STYLE[config=Debug][sdk=*] = Manual
//CODE_SIGN_STYLE[config=Release][sdk=*] = Manual

CODE_SIGN_ENTITLEMENTS[config=Review][sdk=macosx*] = DuckDuckGoDBPBackgroundAgent/DuckDuckGoDBPBackgroundAgent.entitlements
CODE_SIGN_ENTITLEMENTS[config=CI][sdk=macosx*] = DuckDuckGoDBPBackgroundAgent/DuckDuckGoDBPBackgroundAgent.entitlements
CODE_SIGN_ENTITLEMENTS[config=Debug][sdk=macosx*] = DuckDuckGoDBPBackgroundAgent/DuckDuckGoDBPBackgroundAgent.entitlements
CODE_SIGN_ENTITLEMENTS[config=Release][sdk=macosx*] = DuckDuckGoDBPBackgroundAgent/DuckDuckGoDBPBackgroundAgent.entitlements

CODE_SIGN_IDENTITY[sdk=macosx*] = Developer ID Application
CODE_SIGN_IDENTITY[config=Debug][sdk=macosx*] = Apple Development
CODE_SIGN_IDENTITY[config=CI][sdk=macosx*] =

PRODUCT_NAME = $(DBP_AGENT_PRODUCT_NAME)

PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*] =
PROVISIONING_PROFILE_SPECIFIER[config=Review][sdk=macosx*] = macOS DBP Agent - Review
PROVISIONING_PROFILE_SPECIFIER[config=Release][sdk=macosx*] = macOS DBP Agent - Release

FEATURE_FLAGS = FEEDBACK DBP NETWORK_PROTECTION

GCC_PREPROCESSOR_DEFINITIONS[arch=*][sdk=*] = DBP=1 NETP_SYSTEM_EXTENSION=1
GCC_PREPROCESSOR_DEFINITIONS[config=CI][arch=*][sdk=*] = DBP=1 NETP_SYSTEM_EXTENSION=1 DEBUG=1 CI=1 $(inherited)
GCC_PREPROCESSOR_DEFINITIONS[config=Debug][arch=*][sdk=*] = DBP=1 NETP_SYSTEM_EXTENSION=1 DEBUG=1 $(inherited)
GCC_PREPROCESSOR_DEFINITIONS[config=Review][arch=*][sdk=*] = DBP=1 NETP_SYSTEM_EXTENSION=1 REVIEW=1 $(inherited)

SWIFT_ACTIVE_COMPILATION_CONDITIONS[arch=*][sdk=*] = NETP_SYSTEM_EXTENSION $(FEATURE_FLAGS)
SWIFT_ACTIVE_COMPILATION_CONDITIONS[config=CI][arch=*][sdk=*] = NETP_SYSTEM_EXTENSION DEBUG CI $(FEATURE_FLAGS)
SWIFT_ACTIVE_COMPILATION_CONDITIONS[config=Debug][arch=*][sdk=*] = NETP_SYSTEM_EXTENSION DEBUG $(FEATURE_FLAGS)
SWIFT_ACTIVE_COMPILATION_CONDITIONS[config=Review][arch=*][sdk=*] = NETP_SYSTEM_EXTENSION REVIEW $(FEATURE_FLAGS)

SWIFT_OBJC_BRIDGING_HEADER =
SKIP_INSTALL = YES
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME =

#include? "../../../LocalOverrides.xcconfig"
65 changes: 65 additions & 0 deletions Configuration/App/DBP/DuckDuckGoDBPAgentAppStore.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Copyright © 2023 DuckDuckGo. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#include "../AppTargetsBase.xcconfig"
#include "../../AppStore.xcconfig"

// Override AppTargetsBase.xcconfig until we resolve bundle IDs.
PRODUCT_BUNDLE_IDENTIFIER[sdk=*] = $(DBP_AGENT_BUNDLE_ID)
PRODUCT_BUNDLE_IDENTIFIER[config=Debug][sdk=*] = $(DBP_AGENT_BUNDLE_ID)
PRODUCT_BUNDLE_IDENTIFIER[config=CI][sdk=*] = $(DBP_AGENT_BUNDLE_ID)
PRODUCT_BUNDLE_IDENTIFIER[config=Review][sdk=*] = $(DBP_AGENT_BUNDLE_ID)

INFOPLIST_FILE = DuckDuckGoDBPBackgroundAgent/Info.plist
GENERATE_INFOPLIST_FILE = YES
INFOPLIST_KEY_LSUIElement = YES
INFOPLIST_KEY_NSPrincipalClass = Application

// Just make sure to override anything set by the AppTargetBase.xcconfig
//CODE_SIGN_STYLE[config=Debug][sdk=*] = Manual
//CODE_SIGN_STYLE[config=Release][sdk=*] = Manual

CODE_SIGN_ENTITLEMENTS[config=Review][sdk=macosx*] = DuckDuckGoDBPBackgroundAgent/DuckDuckGoDBPBackgroundAgent.entitlements
CODE_SIGN_ENTITLEMENTS[config=CI][sdk=macosx*] = DuckDuckGoDBPBackgroundAgent/DuckDuckGoDBPBackgroundAgent.entitlements
CODE_SIGN_ENTITLEMENTS[config=Debug][sdk=macosx*] = DuckDuckGoDBPBackgroundAgent/DuckDuckGoDBPBackgroundAgent.entitlements
CODE_SIGN_ENTITLEMENTS[config=Release][sdk=macosx*] = DuckDuckGoDBPBackgroundAgent/DuckDuckGoDBPBackgroundAgent.entitlements

CODE_SIGN_IDENTITY[sdk=macosx*] = Developer ID Application
CODE_SIGN_IDENTITY[config=Debug][sdk=macosx*] = Apple Development
CODE_SIGN_IDENTITY[config=CI][sdk=macosx*] =

PRODUCT_NAME = $(DBP_AGENT_PRODUCT_NAME)

PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*] =
PROVISIONING_PROFILE_SPECIFIER[config=Review][sdk=macosx*] = macOS DBP Agent - Review
PROVISIONING_PROFILE_SPECIFIER[config=Release][sdk=macosx*] = macOS DBP Agent - Release

FEATURE_FLAGS = FEEDBACK DBP NETWORK_PROTECTION

GCC_PREPROCESSOR_DEFINITIONS[arch=*][sdk=*] = DBP=1 NETP_SYSTEM_EXTENSION=1
GCC_PREPROCESSOR_DEFINITIONS[config=CI][arch=*][sdk=*] = DBP=1 NETP_SYSTEM_EXTENSION=1 DEBUG=1 CI=1 $(inherited)
GCC_PREPROCESSOR_DEFINITIONS[config=Debug][arch=*][sdk=*] = DBP=1 NETP_SYSTEM_EXTENSION=1 DEBUG=1 $(inherited)
GCC_PREPROCESSOR_DEFINITIONS[config=Review][arch=*][sdk=*] = DBP=1 NETP_SYSTEM_EXTENSION=1 REVIEW=1 $(inherited)

SWIFT_ACTIVE_COMPILATION_CONDITIONS[arch=*][sdk=*] = NETP_SYSTEM_EXTENSION $(FEATURE_FLAGS)
SWIFT_ACTIVE_COMPILATION_CONDITIONS[config=CI][arch=*][sdk=*] = NETP_SYSTEM_EXTENSION DEBUG CI $(FEATURE_FLAGS)
SWIFT_ACTIVE_COMPILATION_CONDITIONS[config=Debug][arch=*][sdk=*] = NETP_SYSTEM_EXTENSION DEBUG $(FEATURE_FLAGS)
SWIFT_ACTIVE_COMPILATION_CONDITIONS[config=Review][arch=*][sdk=*] = NETP_SYSTEM_EXTENSION REVIEW $(FEATURE_FLAGS)

SWIFT_OBJC_BRIDGING_HEADER =
SKIP_INSTALL = YES
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME =

#include? "../../../LocalOverrides.xcconfig"
7 changes: 7 additions & 0 deletions Configuration/App/DuckDuckGoDBP.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ FEATURE_FLAGS = FEEDBACK DBP NETWORK_PROTECTION

PRODUCT_BUNDLE_IDENTIFIER = $(MAIN_BUNDLE_IDENTIFIER)

DBP_BACKGROUND_AGENT_BUNDLE_ID[sdk=*] = com.duckduckgo.macos.DBP.backgroundAgent
DBP_BACKGROUND_AGENT_BUNDLE_ID[config=Debug][sdk=*] = com.duckduckgo.macos.DBP.backgroundAgent.debug
DBP_BACKGROUND_AGENT_BUNDLE_ID[config=CI][sdk=*] = com.duckduckgo.macos.DBP.backgroundAgent.debug
DBP_BACKGROUND_AGENT_BUNDLE_ID[config=Review][sdk=*] = com.duckduckgo.macos.DBP.backgroundAgent.review

DBP_BACKGROUND_AGENT_PRODUCT_NAME = DuckDuckGoDBPBackgroundAgent

PRODUCT_NAME_PREFIX = DuckDuckGoDBP

CODE_SIGN_STYLE[sdk=*] = Automatic
Expand Down
10 changes: 8 additions & 2 deletions Configuration/NetworkProtectionDeveloperID.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ SYSEX_BUNDLE_ID[config=Review][sdk=*] = $(SYSEX_BUNDLE_ID_BASE).review
SYSEX_BUNDLE_ID[config=Release][sdk=*] = $(SYSEX_BUNDLE_ID_BASE)

DISTRIBUTED_NOTIFICATIONS_PREFIX_BASE = $(SYSEX_BUNDLE_ID_BASE)

DISTRIBUTED_NOTIFICATIONS_PREFIX[config=CI][sdk=*] = $(DISTRIBUTED_NOTIFICATIONS_PREFIX_BASE).ci
DISTRIBUTED_NOTIFICATIONS_PREFIX[config=Review][sdk=*] = $(DISTRIBUTED_NOTIFICATIONS_PREFIX_BASE).review
DISTRIBUTED_NOTIFICATIONS_PREFIX[config=Debug][sdk=*] = $(DISTRIBUTED_NOTIFICATIONS_PREFIX_BASE).debug
Expand All @@ -54,13 +55,18 @@ NOTIFICATIONS_AGENT_BUNDLE_ID[sdk=*] = $(DEVELOPMENT_TEAM).com.duckduckgo.macos.
NOTIFICATIONS_AGENT_BUNDLE_ID[config=Debug][sdk=*] = $(DEVELOPMENT_TEAM).com.duckduckgo.macos.browser.network-protection.notifications.debug
NOTIFICATIONS_AGENT_BUNDLE_ID[config=CI][sdk=*] = $(DEVELOPMENT_TEAM).com.duckduckgo.macos.browser.network-protection.notifications.debug
NOTIFICATIONS_AGENT_BUNDLE_ID[config=Review][sdk=*] = $(DEVELOPMENT_TEAM).com.duckduckgo.macos.browser.network-protection.notifications.review
NOTIFICATIONS_AGENT_PRODUCT_NAME = DuckDuckGo Notifications

AGENT_BUNDLE_ID_BASE[sdk=*] = com.duckduckgo.macos.vpn

DBP_AGENT_BUNDLE_ID[sdk=*] = com.duckduckgo.macos.DBP.backgroundAgent
DBP_AGENT_BUNDLE_ID[config=Debug][sdk=*] = com.duckduckgo.macos.DBP.backgroundAgent.debug
DBP_AGENT_BUNDLE_ID[config=CI][sdk=*] = com.duckduckgo.macos.DBP.backgroundAgent.debug
DBP_AGENT_BUNDLE_ID[config=Review][sdk=*] = com.duckduckgo.macos.DBP.backgroundAgent.review
DBP_AGENT_PRODUCT_NAME = DuckDuckGoDBPBackgroundAgent

AGENT_BUNDLE_ID[sdk=*] = $(AGENT_BUNDLE_ID_BASE)
AGENT_BUNDLE_ID[config=Debug][sdk=*] = $(AGENT_BUNDLE_ID_BASE).debug
AGENT_BUNDLE_ID[config=CI][sdk=*] = $(AGENT_BUNDLE_ID_BASE).debug
AGENT_BUNDLE_ID[config=Review][sdk=*] = $(AGENT_BUNDLE_ID_BASE).review

AGENT_PRODUCT_NAME = DuckDuckGo VPN
NOTIFICATIONS_AGENT_PRODUCT_NAME = DuckDuckGo Notifications
Loading