


Tracing the Music application’s system calls.Incidentally, running the code under sudo does not seem to make it work either. The behaviour of the addObserver method has changed so that leaving the name as nil will do nothing if the process is not privileged. This method does not work on macOS Catalina. Then we just have to find the one emitted by changing a track. Perfect! All we have to do is leave the name as nil and that will let us listen to all of the distributed notifications.

When nil, the notification center doesn’t use a notification’s name to decide whether to deliver it to the observer. The name of the notification for which to register the observer that is, only notifications with this name are delivered to the observer. One of the parameters for registering the notification observer is: Just replace the old notification name with the new one. Of course, that means the name of any iTunes related distributed notifications has changed. The problem with macOS CatalinaĬatalina replaced the beloved iTunes application with Apple Music (which is incidentally a lot slower and laggier but that is a story for another time). The main benefit of this compared to polling the iTunes player state with AppleScript is that it uses less processor time and is hence more energy efficient.
