Beware upgrading to MacOS 15.4 if you need “now playing” data?

If your macros rely upon any of the %CurrentTrack% KM tokens, be wary of upgrading to the imminent 15.4 version of MacOS. The release notes for the new update to BetterTouchTool says:

macOS 15.4 doesn't allow third party apps to access the system's "Now Playing" information anymore. This version adds a workaround for this. (For the now playing widgets or the now playing related variables)

I see elsewhere that the affected function is MRMediaRemoteGetNowPlayingInfofunction.

Unlike with BTT, KM's policy is to use only official Apple methods, so a workaround in Keyboard Maestro may not be possible.

BTT‘s developer writes:

In my experience filing feedback with Apple and asking users to file the same does help in such cases. In the past they have undone such private framework blocks multiple times after they noticed the impact. However it’s too late for 15.4 now

As always :roll_eyes:, here is where users can complain to Apple about the state of MacOS:
"Feedback - macOS - Apple"

Maybe someone should write a suite of tests to validate things like this (indeed, to validate every possible token, condition and action in KM) and then we can help The Architect out by running this test suite on beta versions of macOS.

I installed the latest 15.4 beta, and copied my music controls macros to the beta machine ... and they all work fine, including my song info panel, which has this bit of code in its custom HTML prompt:

  // iTunes is playing
  SetID('song', getVariable('%CurrentTrack%name%'));
  SetID('artist', getVariable('%CurrentTrack%artist%'));
  SetID('album', '('+ getVariable('%CurrentTrack%album%') + ')');

So whatever it is that's changed in macOS 15.4, I don't think it will affect anyone's macros, at least based on my simple test.

-rob.

2 Likes

Thanks, that's good to know. I have added a question mark to the topic heading! :laughing:

As a total guess, perhaps Keyboard Maestro gets its song info via AppleScript, and Apple is unlikely to ever break that (given the huge number of apps out there that do it that way). Perhaps BTT was using an alternative method, and that's what broke?

But that's just a guess; all I know is it's working :).

-rob.

1 Like

Wouldn't that be an added incentive for Apple to break it? :rofl:

What you propose certainly seems plausible, with BTT (formerly) and other affected applications relying upon that MRMediaRemoteGetNowPlayingInfofunction and not Applescript. That important distinction also gives me hope that MouseDown‘s EventScripts will be similarly unaffected by the breaking change and still be able to detect track changes in Music.app. :crossed_fingers:

From what I can find, it seems MRMediaRemoteGetNowPlayingInfofunction is a private API, which means Keyboard Maestro won't be affected by anything Apple does to it, given Peter's stance on not using private APIs.

-rob.

1 Like