Repository navigation
Conversation
Development signing replaced keychain-access-groups with the app's own group, so an app and its extensions could not share a keychain group. Keep the groups the build asks for when they belong to the team, after the app's own group, which stays the default for items added without one.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
What does this PR do?
Keeps the keychain access groups an app asks for when it is signed for development, as long as they belong to the team.
Entitlements.update(teamID:bundleID:)replaceskeychain-access-groupswith the app's own group (<team>.<bundle id>). An app and an extension that both list a common group to share keychain items (<team>.com.example.shared) each end up with only their own group. Nothing is reported at build or install time; at runtime every query that names the shared group fails with-34018(errSecMissingEntitlement).With an App Store Connect API key this is the only way an app can share data with its extensions, since app groups can't be assigned there (see #324).
After this change the signed groups are the app's own group, followed by the requested groups that start with
<team>.. Groups of another team, wildcards and unresolved$(AppIdentifierPrefix)values are dropped, as before. The own group stays first on purpose: items added without an explicit group go to the first one, so apps that install today keep storing their items where they already are.No provisioning change is needed: the development profile already grants
<team>.*.Related: #326 keeps a
<team>.sharedgroup when signing for distribution, so this brings development signing in line with it. #324 leaveskeychain-access-groupsuntouched, so the two should compose.How was it tested?
KeychainAccessGroupsTests.swift: the default (own group only), shared groups kept with the own group first whatever the input order, and what gets dropped. Two of the three fail on main.swift teston Linux (Ubuntu 26.04, Swift 6.4.1): 64 tests pass.xtool dev build --sign(paid team, App Store Connect API key) and installed on an Apple TV on tvOS 27.2. Both signed binaries list their own group, then the shared one. The app writes an item in the shared group and the extension reads it. Items the app had stored before, without a group, are still readable. That run used the same merge placed inaddAppon top of build: support tvOS, macOS, and Mac Catalyst apps #362; I moved it intoupdateafterwards to make it testable.make lintcould not run on my host (the SwiftLint binary needslibxml2.so.2).AI tool usage
How much of the code in this PR was AI-assisted? (check one)
Summary by CodeRabbit