Hi there! I published an auto clicker app on the Mac App Store about 7 months ago with no issue. However, I just submitted a new update and was binary rejected for the following reason:
"Your app uses public APIs in an unapproved manner, which does not comply with guideline 2.5.1 of the App Store Review Guidelines. Specifically, the app uses Accessibility to keep the mouse active, which is not the intended use of the Accessibility API."
I'm currently using a CGEvent.post() to click automatically, and this requires Accessibility permissions to work.
Is there an approved, official way to programmatically click for users? There are tons of auto clickers on the Mac App Store, so I'm a little confused as to why I'm being rejected now.
Thank you so much!
Here's the code snippet that actually clicks the mouse:
if AXIsProcessTrusted() == true {
var ml = NSEvent.mouseLocation
ml.y = NSHeight(NSScreen.screens[0].frame) - ml.y
var location = CGPoint(x: ml.x, y: ml.y)
var downClick = CGEvent(mouseEventSource: nil, mouseType: mouseTypeDown, mouseCursorPosition: location, mouseButton: mouseButton)!
var upClick = CGEvent(mouseEventSource: nil, mouseType: mouseTypeUp, mouseCursorPosition: location, mouseButton: mouseButton)!
downClick.post(tap: .cghidEventTap)
upClick.post(tap: .cghidEventTap)
}