You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Integrate macOS ServiceManagement SMAppService into the LaunchAtLogin implementation and update docs/examples.
Changes:
- src/platform/macos/launch_at_login_macos.mm: Add conditional import for ServiceManagement, gate macOS 13+ SMAppService usage, remove legacy LaunchAgents file plumbing, and implement registration/unregistration via SMAppService. Add helpers (IsCurrentProgram, CanUseConfiguredProgram) and track default id/program to enforce that SMAppService can only register the main app or bundled helper (no arbitrary executable paths or ProgramArguments).
- src/CMakeLists.txt: Link the ServiceManagement framework when building for Apple targets.
- src/launch_at_login.h and src/capi/launch_at_login_c.h: Update API docs to note macOS SMAppService behavior and limitations (no arbitrary executable paths/arguments for main-app login items).
- examples/*: Update C and C++ examples to use the default constructor on macOS (which registers the main app) and avoid setting program/arguments on macOS where not supported.
Reasoning: On modern macOS (13+), SMAppService is the supported API for login items and does not accept arbitrary program paths or ProgramArguments for the main app; this change adopts SMAppService where available, documents the platform limitations, and prevents attempts to register unsupported configurations.
0 commit comments