Our application uses shortcuts to automate some tasks with other applications, we have two version, a sandboxed one, and a more powerfull application with no sandbox.
Our solution was working well on Sandboxed or not sandboxed apps before Ventura 13.2.
With Ventura 13.2, the not sandboxed application is not working anymore, except if we give "Full Disk" access to our software.
To run the shortcut, we simply use the shortcuts
executable.
let process = Process()
let outputDir = outputFile.deletingLastPathComponent()
process.executableURL = URL(fileURLWithPath: "/usr/bin/shortcuts")
process.arguments = [
"run",
"Zip Shortcut",
"--input-path",
inputFile.path,
"--output-path",
outputFile.path
]
let outputPipe = Pipe()
let errorPipe = Pipe()
process.standardOutput = outputPipe
process.standardError = errorPipe
do {
try process.run()
} catch { ....
We we try to execute a simple shortcut (a shorcut that zip the file for example), we have this error message :
open on /Users/hlemai/Library/Shortcuts/Temporary/com.apple.shortcuts.ShortcutsCommandLine/129FFC94-FE02-493D-8192-7AA6CD5BE928: Operation not permitted
We want to avoid our user to provide a full Disk access, but it seems that the mecanism used in our sandboxed app (using Security Bookmark) is not working on the not sandboxed one.
Is it possible to used the same mecanism storing security bookmark (with "com.apple.security.files.bookmarks.app-scope" entitlement) ?