SMAppService
An object the framework uses to control helper executables that live inside an app’s main bundle.
Declaration
class SMAppServiceOverview
In macOS 13 and later, use SMAppService to register and control LoginItems, LaunchAgents, and LaunchDaemons as helper executables for your app. When converting code from earlier versions of macOS, use an SMAppService object and select one of the following methods depending on the type of service your helper executable provides:
For
SMAppServicesinitialized asLoginItems, the register() and unregister() APIs provide a replacement for SMLoginItemSetEnabled(_:_:).For
SMAppServicesinitialized asLaunchAgents, the register() and unregister() methods provide a replacement for installing property lists in~/Library/LaunchAgentsor/Library/LaunchAgents.For
SMAppServicesinitialized asLaunchDaemons, the register() and unregister() methods provide a replacement for installing property lists in/Library/LaunchDaemons.