2.4.2 #8
@@ -25,17 +25,11 @@ import Foundation
|
|||||||
import os
|
import os
|
||||||
import Security
|
import Security
|
||||||
|
|
||||||
/// Kill switch for the Personal Data tools (Calendar/Reminders/Contacts/Location & Maps).
|
/// Kill switch for the entire Personal Data tools section (Calendar/Reminders/Contacts/
|
||||||
/// Flip `isHiddenPendingAppleFix` back to `false` once Apple fixes the macOS 27 beta TCC bug
|
/// Location & Maps). Hides the UI and forces every `*Enabled` getter to return `false`
|
||||||
/// (filed with Apple). Each flag hides the relevant UI and forces the `*Enabled` getter to
|
/// regardless of the persisted DB value — no code deleted, just inert.
|
||||||
/// return `false` regardless of the persisted DB value — no code deleted, just inert.
|
|
||||||
enum PersonalDataTools {
|
enum PersonalDataTools {
|
||||||
/// Hides the entire Personal Data section. Flip to `false` once all four services work.
|
|
||||||
static let isHiddenPendingAppleFix = false
|
static let isHiddenPendingAppleFix = false
|
||||||
/// Hides only the Contacts row. Was broken under hardened runtime on macOS 27 beta 2
|
|
||||||
/// (Calendar/Reminders/Location were fine). Re-enabled 2026-07-21 to retest on beta 4 —
|
|
||||||
/// flip back to `true` if `CNContactStore.requestAccess` still fails under signed builds.
|
|
||||||
static let isContactsHiddenPendingAppleFix = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Observable
|
@Observable
|
||||||
@@ -719,7 +713,7 @@ class SettingsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var contactsEnabled: Bool {
|
var contactsEnabled: Bool {
|
||||||
get { !PersonalDataTools.isHiddenPendingAppleFix && !PersonalDataTools.isContactsHiddenPendingAppleFix && cache["contactsEnabled"] == "true" }
|
get { !PersonalDataTools.isHiddenPendingAppleFix && cache["contactsEnabled"] == "true" }
|
||||||
set {
|
set {
|
||||||
cache["contactsEnabled"] = String(newValue)
|
cache["contactsEnabled"] = String(newValue)
|
||||||
DatabaseService.shared.setSetting(key: "contactsEnabled", value: String(newValue))
|
DatabaseService.shared.setSetting(key: "contactsEnabled", value: String(newValue))
|
||||||
|
|||||||
@@ -829,10 +829,6 @@ It's better to admit "I need more information" or "I cannot do that" than to fak
|
|||||||
externalMCPSection
|
externalMCPSection
|
||||||
|
|
||||||
// MARK: Personal Data
|
// MARK: Personal Data
|
||||||
// isHiddenPendingAppleFix hides the entire section (macOS 27 beta TCC bug).
|
|
||||||
// isContactsHiddenPendingAppleFix hides just the Contacts row — was broken in beta 2
|
|
||||||
// under hardened runtime while Calendar/Reminders/Location were fixed. Re-enabled
|
|
||||||
// 2026-07-21 to retest on beta 4; flip back to true if it regresses.
|
|
||||||
if !PersonalDataTools.isHiddenPendingAppleFix {
|
if !PersonalDataTools.isHiddenPendingAppleFix {
|
||||||
Divider()
|
Divider()
|
||||||
|
|
||||||
@@ -843,16 +839,6 @@ It's better to admit "I need more information" or "I cannot do that" than to fak
|
|||||||
.foregroundStyle(.teal)
|
.foregroundStyle(.teal)
|
||||||
Text("Personal Data")
|
Text("Personal Data")
|
||||||
.font(.system(size: 18, weight: .semibold))
|
.font(.system(size: 18, weight: .semibold))
|
||||||
if PersonalDataTools.isContactsHiddenPendingAppleFix {
|
|
||||||
Text("β")
|
|
||||||
.font(.system(size: 11, weight: .bold))
|
|
||||||
.foregroundStyle(.orange)
|
|
||||||
.padding(.horizontal, 5)
|
|
||||||
.padding(.vertical, 2)
|
|
||||||
.background(Color.orange.opacity(0.15))
|
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 4))
|
|
||||||
.help("Beta Feature. May change.")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Text("Let the AI access your Calendar, Reminders, Contacts, and Location & Maps to answer questions about your schedule and surroundings. Each service is opt-in and uses standard macOS permission prompts. This functionality is in beta and may change.")
|
Text("Let the AI access your Calendar, Reminders, Contacts, and Location & Maps to answer questions about your schedule and surroundings. Each service is opt-in and uses standard macOS permission prompts. This functionality is in beta and may change.")
|
||||||
.font(.system(size: 14))
|
.font(.system(size: 14))
|
||||||
@@ -889,16 +875,14 @@ It's better to admit "I need more information" or "I cannot do that" than to fak
|
|||||||
requestAccess: { remindersAccessState = await EventKitService.shared.requestReminderAccess() ? .granted : EventKitService.shared.reminderAccessState }
|
requestAccess: { remindersAccessState = await EventKitService.shared.requestReminderAccess() ? .granted : EventKitService.shared.reminderAccessState }
|
||||||
)
|
)
|
||||||
rowDivider()
|
rowDivider()
|
||||||
if !PersonalDataTools.isContactsHiddenPendingAppleFix {
|
personalDataRow(
|
||||||
personalDataRow(
|
title: "Contacts",
|
||||||
title: "Contacts",
|
isEnabled: $settingsService.contactsEnabled,
|
||||||
isEnabled: $settingsService.contactsEnabled,
|
state: contactsAccessState,
|
||||||
state: contactsAccessState,
|
systemSettingsAnchor: "Privacy_Contacts",
|
||||||
systemSettingsAnchor: "Privacy_Contacts",
|
requestAccess: { contactsAccessState = await ContactsService.shared.requestAccess() ? .granted : ContactsService.shared.accessState }
|
||||||
requestAccess: { contactsAccessState = await ContactsService.shared.requestAccess() ? .granted : ContactsService.shared.accessState }
|
)
|
||||||
)
|
rowDivider()
|
||||||
rowDivider()
|
|
||||||
}
|
|
||||||
personalDataRow(
|
personalDataRow(
|
||||||
title: "Location & Maps",
|
title: "Location & Maps",
|
||||||
isEnabled: $settingsService.locationMapsEnabled,
|
isEnabled: $settingsService.locationMapsEnabled,
|
||||||
|
|||||||
Reference in New Issue
Block a user