I'm developing a sandboxed clipboard history manager for macOS. When a user selects an item from their clipboard history, the app:
Writes the data to NSPasteboard.general
Posts a ⌘V keystroke via CGEvent.post(tap: .cgSessionEventTap)
This requires the user to grant permission under System Settings > Privacy & Security > Accessibility (kTCCServicePostEvent). The app does not use any Accessibility framework APIs (AXUIElement, AXIsProcessTrusted, etc.) — only Core Graphics event
posting.
The app has been rejected twice under Guideline 2.4.5, with the reviewer stating that Accessibility features should not be used for non-accessibility purposes.
My understanding is that kTCCServicePostEvent (used by CGEvent.post) is a separate TCC service from kTCCServiceAccessibility (used by AXUIElement APIs), but both appear under "Accessibility" in System Settings, which may be causing confusion.
My questions:
Is there an approved way for a sandboxed Mac App Store app to simulate a keystroke (specifically ⌘V) after writing to the pasteboard?
If CGEvent.post is not appropriate for App Store apps, what alternative API should clipboard managers use to provide a "paste" action?
Is there a way to use CGEvent.post that is compliant with Guideline 2.4.5?
I have a minimal sample project (single Swift file, sandboxed) that demonstrates the behavior. I can share it if helpful.
I was referred here by DTS (Case-ID: 19088416).
1
0
232