Fix Contacts TCC entitlement key: contacts -> addressbook
Confirmed root cause via tccd's own log output: the hardened-runtime hardened-runtime prompting policy checks for com.apple.security.personal-information.addressbook (the Contacts framework's TCC service is still internally named kTCCServiceAddressBook, a holdover from the old AddressBook framework), not com.apple.security.personal-information.contacts as the entitlements file had. With the correct key, tccd allows the prompt and access is now granted correctly on both macOS 27 beta and 26.5.1 stable — this was never an OS bug, notarization requirement, or beta-only issue. Also keeps the fuller CNError domain/code/userInfo logging added while diagnosing this, in case Contacts TCC issues resurface.
This commit is contained in:
@@ -63,7 +63,8 @@ class ContactsService {
|
|||||||
store.requestAccess(for: .contacts) { granted, error in
|
store.requestAccess(for: .contacts) { granted, error in
|
||||||
let after = CNContactStore.authorizationStatus(for: .contacts)
|
let after = CNContactStore.authorizationStatus(for: .contacts)
|
||||||
if let error {
|
if let error {
|
||||||
Log.mcp.error("ContactsService.requestAccess: error=\(error.localizedDescription); granted=\(granted); status after = \(Self.describe(after)) (raw=\(after.rawValue))")
|
let nsError = error as NSError
|
||||||
|
Log.mcp.error("ContactsService.requestAccess: error=\(error.localizedDescription) domain=\(nsError.domain) code=\(nsError.code) userInfo=\(nsError.userInfo); granted=\(granted); status after = \(Self.describe(after)) (raw=\(after.rawValue))")
|
||||||
} else {
|
} else {
|
||||||
Log.mcp.info("ContactsService.requestAccess: granted=\(granted); status after = \(Self.describe(after)) (raw=\(after.rawValue))")
|
Log.mcp.info("ContactsService.requestAccess: granted=\(granted); status after = \(Self.describe(after)) (raw=\(after.rawValue))")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.personal-information.reminders</key>
|
<key>com.apple.security.personal-information.reminders</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.personal-information.contacts</key>
|
<key>com.apple.security.personal-information.addressbook</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.personal-information.location</key>
|
<key>com.apple.security.personal-information.location</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
|||||||
Reference in New Issue
Block a user