Calling /usr/sbin/screencapture from my sandboxed app (using NSTask) is generating a sandox violation error and I get an error as result.
com.apple.sandbox.reporting Category: violation
screencapture(3428) deny mach-register com.apple.screencapture.interactive
Violation: deny mach-register com.apple.screencapture.interactive
Process: screencapture [3428]
Path: /usr/sbin/screencapture
Load Address: 0x10154a000
Identifier: screencapture
On versions before Sierra this was working without any problems. There are changes regarding sandox in 10.12? Didn't find anything related.