To simulate old macOS versions prior to macOS 13, add -D SIMULATE_OLD_MACOS to "Other Swift Flags" in Build Settings of the WakaTime target.
Open issues:
On my system, I cannot currently disable the login item for older macOS versions using the checkbox in the WakaTime Settings window. The function call to SMLoginItemSetEnabled("macos-wakatime.WakaTimeHelper" as CFString, false) succeeds, but the login item is not disabled in the System Settings. I have limited time to investigate further today and will test on another system. It would be great if you could check if that happens on your system as well, but you need to enable the old macOS simulation flag described above if you don't have an older Mac available.
Some additional information on the old way of macOS login item handling:
You can remove the app from "Allow in the Background" simply by deleting it (and emptying the trash). To delete the debug build, look in DerivedData (Xcode main menu -> File -> Project Settings).
When testing, make sure to delete the app's user prefs by doing defaults delete macos-wakatime.WakaTime prior to compiling and launching macos-wakatime.
To simulate old macOS versions prior to macOS 13, add
-D SIMULATE_OLD_MACOS
to "Other Swift Flags" in Build Settings of the WakaTime target.Open issues:
SMLoginItemSetEnabled("macos-wakatime.WakaTimeHelper" as CFString, false)
succeeds, but the login item is not disabled in the System Settings. I have limited time to investigate further today and will test on another system. It would be great if you could check if that happens on your system as well, but you need to enable the old macOS simulation flag described above if you don't have an older Mac available.Some additional information on the old way of macOS login item handling:
defaults delete macos-wakatime.WakaTime
prior to compiling and launching macos-wakatime.