Skip to content

Replace iTunes references with Music (fixes #40) - #49

Open
timokox wants to merge 1 commit into
bhaller:masterfrom
timokox:fix-itunes-to-music
Open

Replace iTunes references with Music (fixes #40)#49
timokox wants to merge 1 commit into
bhaller:masterfrom
timokox:fix-itunes-to-music

Conversation

@timokox

@timokox timokox commented May 22, 2026

Copy link
Copy Markdown

Fixes #40.

iTunes was renamed to Music in macOS 10.15, which is Jiggler's minimum deployment target (MACOSX_DEPLOYMENT_TARGET = 10.15), so iTunes is never present on any supported version. The previous code was sending AppleEvents to iTunes, registering for com.apple.iTunes.playerInfo, and matching the running-app bundle id com.apple.iTunes, none of which can succeed.

Changes

  • AppDelegate.m
    • Distributed notification subscription: com.apple.iTunes.playerInfocom.apple.Music.playerInfo
    • Running-app match: localized name iTunes/bundle id com.apple.iTunesMusic/com.apple.Music
    • AppleScript target: tell application "iTunes"tell application "Music"
    • Updated related log lines and comments
  • Renamed internal symbols for consistency: iTunesIsPlaying, iTunesIsRunningNow, iTunesIsPlayingNow, iTunesChanged:, onlyWithITunesPlaying, onlyWithITunesPlayingCheckbox, onlyWithITunesPlayingChanged:, OnlyWithITunesPlayingDefaultsKey (C identifier only) → music… / Music… equivalents.
  • Base.lproj/Preferences.xib: button title iTunes is currently playing music…Music is currently playing…, plus matching outlet/action names.

Backwards compatibility

The NSUserDefaults key string literal is deliberately left as @"OnlyWithITunesPlaying" (only the C identifier is renamed), so existing users' stored preferences continue to be honoured. A comment notes this.

Notes

  • The AppleScript player state property still returns the kPSP four-char code for "playing" in Music.app — no change needed there.
  • No new dependencies. Same deployment target.

iTunes was renamed to Music in macOS 10.15, which is Jiggler's minimum
deployment target. Update the running-app check, AppleScript target,
and com.apple.iTunes.playerInfo distributed notification to use Music
and its com.apple.Music bundle id. Rename internal identifiers
(iTunesIsPlaying, onlyWithITunesPlaying, methods, IB outlet, action)
for consistency, and update the Preferences UI label.

The OnlyWithITunesPlaying NSUserDefaults key string is retained so
existing users' stored preferences continue to work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Various references to "iTunes" should be changed to "Music" or "Music.app"

1 participant