Fix macOS 15 'access data from other apps' prompt from the FDA check; show the menu in every folder - #126
Merged
Conversation
Reading ~/Library/Mail, ~/Library/Messages and ~/Library/Safari fires the
macOS 15 TCC "App Data" consent ("RClick" would like to access data from
other apps) on every app launch. Probe the user TCC store instead: it is
gated by Full Disk Access itself (kTCCServiceSystemPolicyAllFiles), which
macOS denies silently, so the check stays accurate without ever prompting.
Also drop the POSIX access() fast path: the probe directory is owned by
the current user, so access(R_OK) succeeds on POSIX permissions alone and
would report FDA as granted when it is not.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The observed set (/Users/ plus external volumes) left everything else on the system volume - /Applications, /opt, /tmp, ... - without the RClick context menu, although the method comment says whole-disk observation. Observing the root covers all of it, including external and network volumes mounted under /Volumes. FileProvider-backed locations (iCloud Drive, synced Desktop & Documents) remain excluded by macOS itself. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small, independent fixes (one commit each). 中文摘要在最后。
1. PermissionChecker: stop probing Mail/Messages/Safari
PermissionChecker.hasFullDiskAccess()reads~/Library/Mail,~/Library/Messagesand~/Library/Safari. On macOS 15+ each of those reads goes through the TCC App Data class, so the "RClick" would like to access data from other apps dialog appears at app launch — and reappears on later launches, because answers for that consent class are not persisted reliably.This PR probes
~/Library/Application Support/com.apple.TCCinstead. That directory is protected by Full Disk Access itself (kTCCServiceSystemPolicyAllFiles), which macOS denies silently — so the check keeps its accuracy with zero prompts. The POSIXaccess()fast path is removed because the probe directory is owner-readable at the POSIX level, which would have reported FDA as granted when it is not.2. FinderSyncExt: observe
/so the menu appears everywheresetupObservingDirectories()currently observes/Users/plus external volumes, so any folder elsewhere on the system volume (/Applications,/opt,/tmp, …) silently shows the plain Finder menu — even though the method's own comment says 全盘监听. Observing/covers everything, including volumes mounted under/Volumes. (FileProvider-backed locations such as iCloud Drive remain excluded by macOS for all FinderSync extensions.)Testing
Verified on an Apple-silicon Mac running macOS 15+: with the extension rebuilt from this branch, the context menu renders in
/Applicationsand other system-volume folders, and no App Data prompt appears at launch or after Finder restarts.Related note (not part of this PR)
The extension itself can also trigger the same App Data prompt on every fresh extension process, because it reads
UserDefaults(suiteName: "group.cn.wflixu.RClick")at first menu build and macOS 15 expects app-group ids to be team-ID-prefixed on macOS. Renaming the group to4L3563XCBN.cn.wflixu.RClick(entitlements +Constants.suitName+AppLocalization/StringExtension/ModelContainer) would remove that prompt too, but it needs a data-migration decision for existing users' SwiftData store, so it is left out of this PR.中文摘要:
PermissionChecker不再探测 Mail/Messages/Safari(这在 macOS 15 上每次启动都会触发"访问其他 App 数据"弹窗),改为探测 TCC 数据库目录——它受完全磁盘访问保护、被系统静默拒绝,检测依然准确但零弹窗。/,使/Applications、/opt等系统卷目录也显示右键菜单(与注释"全盘监听"一致)。4L3563XCBN.cn.wflixu.RClick(涉及数据迁移,未包含在本 PR 中)。🤖 Generated with Claude Code