Search code examples
scripting-bridge

How do you get the scripting dictionary for Music.app in macOS Catalina?


The command sdef /Applications/Music.app | sdp -fh --basename Music returns couldn't get sdef for /Applications/Music.app (error -43) in macOS Catalina but using it in High Sierra works as expected (changing Music.app to iTunes.app)

If you open the contents of Music.app you'll find the dictionary inside Resources. Has there been any changes in Catalina about retrieving the dictionary definition?


Solution

  • In Catalina, all built-in system applications are under /System/Applications (a new read-only directory), not /Applications like they were previously. The /Applications folder now houses third party and user installed applications.

    macOS Catalina uses firmlinks1 to include applications from the /System/Applications, inside the /Applications folder.

    It's a little confusing, but the end-result is that—you need to call sdef on /System/Applications/Music.app, not /Applications/Music.app, as /Applications/Music.app is only a firmlink. sdef, however, doesn't seem to follow the firmlink, for reasons I haven't been able to figure out at this time.