SMLoginItemSetEnabled(_:_:)
Enables a helper executable in the main app-bundle directory.
Declaration
func SMLoginItemSetEnabled(_ identifier: CFString, _ enabled: Bool) -> BoolParameters
- identifier:
The identifier of the helper executable bundle.
- enabled:
A Boolean value that represents the state of the helper executable. This value is effective only for the currently logged-in user. If True, the helper tool executable immediately (and upon subsequent logins) and keeps running. If False, the helper executable stops.
Return Value
Returns true if the requested change has taken effect.
Discussion
The build system places helper executables in the app’s bundle in the Contents/Library/LoginItems directory.