0 Replies
      Latest reply on Dec 1, 2019 7:49 PM by seldomseenkid
      seldomseenkid Level 1 Level 1 (0 points)

        I'm writing a Cocoa app that scripts various functions of the Music app. I'm successfully scripting a number of operations (create playlist, play tracks), but all AirPlay ops (get devices, set device volume) are failing with a permissions error: "-[Music airplayDevices_]: Music got an error: A privilege violation occurred. (error -10004)"



        • I'm using the AppleScriptObjC framework from Swift
        • targeting Catalina/Music, but have the same failures in Mojave/iTunes
        • code succeeds when not sandboxed - only fails in the sandbox


        The entitlements file includes the following:



        i.e. all access-groups I could find using "sdef /System/Applications/Music.app". According to the sdef, AirPlay access is controlled by com.apple.Music.playback, which is included above.


        I assume I need some other entitlement as well, but I can't for the life of me find out what it is.