[BITAU-120] Setup New Shared App Group Entitlements (#143)

This commit is contained in:
Brant DeBow 2024-09-10 08:39:45 -04:00 committed by GitHub
parent 11cd846c94
commit d1339d13f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 16 additions and 3 deletions

View File

@ -4,7 +4,8 @@
<dict>
<key>com.apple.security.application-groups</key>
<array>
<string>group.com.bitwarden.authenticator</string>
<string>group.${BASE_BUNDLE_ID}</string>
<string>$(SHARED_APP_GROUP_IDENTIFIER)</string>
</array>
<key>keychain-access-groups</key>
<array>

View File

@ -122,5 +122,7 @@
</array>
<key>XSAppIconAssets</key>
<string>Resources/Assets.xcassets/AppIcons.appiconset</string>
<key>BitwardenAuthenticatorSharedAppGroup</key>
<string>$(SHARED_APP_GROUP_IDENTIFIER)</string>
</dict>
</plist>

View File

@ -32,4 +32,10 @@ extension Bundle {
var groupIdentifier: String {
"group." + appIdentifier
}
/// Return's the shared app group identifier. This App Group is shared between the
/// main Bitwarden app and the Authenticator app.
var sharedAppGroupIdentifier: String {
infoDictionary?["BitwardenAuthenticatorSharedAppGroup"] as? String ?? groupIdentifier
}
}

View File

@ -4,5 +4,5 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
CODE_SIGN_ENTITLEMENTS = Authenticator/Application/Support/Entitlements/Authenticator.entitlements
FIREBASE_CONFIG_FILENAME = GoogleService-Info.plist
PRODUCT_BUNDLE_IDENTIFIER = com.bitwarden.authenticator
PRODUCT_BUNDLE_IDENTIFIER = $(BASE_BUNDLE_ID)
SWIFT_ACTIVE_COMPILATION_CONDITIONS = $(inherited) PREVIEWS

View File

@ -2,6 +2,7 @@ CODE_SIGN_STYLE = Automatic
DEVELOPMENT_TEAM = LTZ2PFU5D6
ORGANIZATION_IDENTIFIER = com.bitwarden
BASE_BUNDLE_ID = $(ORGANIZATION_IDENTIFIER).authenticator
SHARED_APP_GROUP_IDENTIFIER = group.${ORGANIZATION_IDENTIFIER}.bitwarden-authenticator
// The above code signing settings can be overriden by adding a Local.xcconfig
// file in the Configs directory.

View File

@ -27,11 +27,13 @@ export_options_file="Configs/export_options.plist"
case $variant in
Production)
ios_bundle_id='com.bitwarden.authenticator'
shared_app_group_id='group.com.bitwarden.bitwarden-authenticator'
profile_prefix="Dist:"
app_icon="AppIcon"
;;
Beta)
ios_bundle_id='com.bitwarden.autenticator'
ios_bundle_id='com.bitwarden.autenticator.beta'
shared_app_group_id='group.com.bitwarden.bitwarden-authenticator.beta'
profile_prefix="Dist: Beta"
app_icon="AppIcon-Beta"
;;
@ -43,6 +45,7 @@ CODE_SIGN_IDENTITY = Apple Distribution
DEVELOPMENT_TEAM = LTZ2PFU5D6
ORGANIZATION_IDENTIFIER = com.8bit
BASE_BUNDLE_ID = ${ios_bundle_id}
SHARED_APP_GROUP_IDENTIFIER = ${shared_app_group_id}
APPICON_NAME = ${app_icon}
PROVISIONING_PROFILE_SPECIFIER = ${profile_prefix} Bitwarden Authenticator
EOF