SMLoginItem.h Reference

Declared in
SMLoginItem.h

Overview

Included Headers

  • <sys/cdefs.h>

Functions

See the Overview section above for header-level documentation.

SMLoginItemSetEnabled

Enable a helper application located in the main application bundle's Contents/Library/LoginItems directory.

Boolean SMLoginItemSetEnabled(
   CFStringRef identifier,
   Boolean enabled);
Parameters
identifier

The bundle identifier of the helper application bundle.

enabled

The Boolean enabled state of the helper application. This value is effective only for the currently logged in user. If true, the helper application will be started immediately (and upon subsequent logins) and kept running. If false, the helper application will no longer be kept running.

Return Value

Returns true if the requested change has taken effect.

Availability
  • Available in OS X v10.7 and later.
Related Sample Code
Declared In
SMLoginItem.h