2

Sandboxed apps and most built in apps will automatically create a folder called their package identifier inside ~/Library/Application Scripts and will sometimes break if that directory is unavailable

What purpose does this directory fill, and why do all sandboxed apps automatically try to create a directory named their package identifier com.example.someapp inside? All of the folders inside Application Scripts are empty as far as I can tell

1
  • Upon searching, I found tangent questions about what is the difference between Scripts and Application Scripts, but I could not find anything about what is Application Scripts itself
    – CPlus
    Commented Oct 20, 2021 at 15:34

1 Answer 1

4

~/Library/Application Scripts is a directory for apps to run user-supplied scripts. This is largely useful to sandboxed apps, as scripts in this directory gets special privileges to execute outside of the app's sandbox security restrictions. The app can read scripts from the directory, but not write to the directory.

As you might imagine, there aren't that many sandboxed apps that need to execute user-supplied AppleScripts. Also, since this is a directory for user-supplied scripts, only advanced users would probably make use of this directory -- even if they were aware the capability exists for a given app.

References: https://developer.apple.com/documentation/foundation/nssearchpathdirectory/nsapplicationscriptsdirectory

https://developer.apple.com/documentation/foundation/nsuserapplescripttask

1
  • 1
    That answers it but it would be better if the Application Scripts directory was created as soon as it is requested instead of upon initialization to reduce the number of extraneous directories for apps that do not support scripts
    – CPlus
    Commented Oct 20, 2021 at 20:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .