Skip to content

๐Ÿž Points out a permission issue when scripting Music.app on the Catalina Beta.

License

Notifications You must be signed in to change notification settings

boyvanamstel/CatalinaMusicScripting-BugReport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Music.app Permission Issue

Shows an issue that prevents apps from accessing player info using AppleScript when sandboxing is enabled.

Introduction

While Music.app uses a scripting interface very similar to iTunes, security scopes aren't handled the same or have a bug. The following entitlements allow iTunes to fetch the track info without issue. With Music.app an error is shown.

<key>com.apple.security.scripting-targets</key>
<dict>
	<key>com.apple.Music</key>
	<array>
		<string>com.apple.Music.playback</string>
		<string>com.apple.Music.library.read</string>
	</array>
</dict>

Only library information (com.apple.Music.library.read) seems to be affected. Fetching track artwork for instance works as expected.

Setup

  1. Launch Music.app.
  2. Run the project.

Steps to reproduce

  1. Access a song on Apple Music, load a local track or skip a track.
  2. Grant permission to CatalinaMusicBridge.app to access Music.app.

Notice the error that appears in the Console: Privilege violation error shown in the console

Also note that the player state did update appropriately.

  1. Disable sandboxing in CatalinaMusicBridge.entitlements.
<key>com.apple.security.app-sandbox</key>
<false/>
  1. Run the project again.
  2. Skip a track in Music.app.

Notice that the track information gets properly displayed: A screenshot of the app window showing track information

Updates

September 11th, 2019

  • Discovered that the issue is caused by name of current track. The artist, artwork and player state work as expected (for local tracks at least).

About

๐Ÿž Points out a permission issue when scripting Music.app on the Catalina Beta.

rdar://FB6119253

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages