Skip to content

SMAppService and Login Items in macOS 13+

How apps register login items, agents and daemons with SMAppService since macOS 13, how those differ from legacy plists, and how they appear in the BTM store.

Published on 7 min read
On this page

TL;DR. Since macOS 13, apps register background helpers with SMAppService: the main app as a login item, helper apps in Contents/Library/LoginItems, and launch agents and daemons whose plists stay inside the bundle, in Contents/Library/LaunchAgents and Contents/Library/LaunchDaemons. Background Task Management records each registration and links it to the app. In sfltool dumpbtm, such an item is an agent or daemon without the legacy prefix, and its URL may be relative to the app. For investigators, the point is simple: these helpers are not in the LaunchAgents folders you usually scan, but they are in the BTM store.

Before macOS 13

Background helpers used to be installed in several ways:

MechanismWhat it didStatus
Plist in ~/Library/LaunchAgents, /Library/LaunchAgents, /Library/LaunchDaemonsInstaller or script writes the plist; launchd loads itStill works; BTM calls these legacy items
SMLoginItemSetEnabledEnables a helper app from Contents/Library/LoginItemsDeprecated in macOS 13
SMJobBlessInstalls a privileged helper, typically into /Library/PrivilegedHelperTools, with its daemon plistDeprecated in macOS 13
Open at Login listThe user, or the app on the user's behalf, adds the app to the listStored in backgrounditems.btm from 10.13 to 12; in BTM since 13

SMLoginItemSetEnabled helpers are commonly reported to be tracked in /private/var/db/com.apple.xpc.launchd/loginitems.<uid>.plist. Collection tools such as UAC take those files.

The SMAppService API

Apple documents SMAppService as the object that controls helper executables living inside an app's main bundle, available from macOS 13. An app picks one of four constructors:

ConstructorWhat it registersWhere it must be
SMAppService.mainAppThe app itself, as a login itemThe app
SMAppService.loginItem(identifier:)A helper app, by bundle identifierContents/Library/LoginItems/
SMAppService.agent(plistName:)A launch agentContents/Library/LaunchAgents/
SMAppService.daemon(plistName:)A launch daemonContents/Library/LaunchDaemons/

Then it calls register() or unregister(), and reads status, which is one of notRegistered, enabled, requiresApproval or notFound. openSystemSettingsLoginItems() opens the Login Items pane so the user can approve. For apps that still install legacy plists, statusForLegacyPlist(at:) reports whether the user has switched them off.

Plists inside the bundle use a key the legacy folders do not accept: BundleProgram. The launchd.plist man page describes it as an app-bundle relative path to the executable, supported only for plists installed using SMAppService. A plist with BundleProgram is therefore a sign of the modern path.

What registration does

Apple's documentation of register() sets out the behaviour by type:

  • Login item helper: starts immediately and at each later login. If it crashes or exits with a non-zero status, the system relaunches it.
  • Main app: launches at later logins.
  • Launch agent: bootstrapped immediately and at each later login. An app that needs the agent for several users must register once per user, while that user runs the app.
  • Launch daemon: not bootstrapped until an administrator approves it in System Settings; after approval, at each boot.

Apple adds that if the user approves a daemon, the system approves the other helpers in the same bundle too. Other helpers start at once and can be switched off afterwards.

How System Settings names an item

Apple documents how the Login Items pane decides what to show, and it explains many of the names you will see in sfltool dumpbtm:

  1. Agents and daemons inside an app bundle are shown under that app.
  2. A legacy plist with the AssociatedBundleIdentifiers key is shown under the app it names. The team identifier of the plist's executable must match the app's.
  3. A legacy plist without that key is shown under the organization name in the signing certificate.
  4. An unsigned legacy item that cannot be attributed is shown by the executable name from Program or ProgramArguments.

Case 4 is the one that should catch your attention in an investigation, even though many legitimate tools land there too.

How these items appear in the BTM store

Legacy plistSMAppService item
Plist locationA launchd folderInside the app bundle
Type in sfltool dumpbtmlegacy agent, legacy daemonagent, daemon, login item, app
Legacy bit 0x10000SetClear
URLThe plist pathCan be relative to the app
ParentA developer record, or Unknown DeveloperThe app record

Apple's Endpoint Security documentation backs two of these rows. Its BTM item has a legacy flag, true when the item is a legacy plist, and it notes that a relative item URL is relative to the app URL. The rest is what published dumps show. The app record lists its helpers under Embedded Item Identifiers, and each helper points back with Parent Identifier.

In the FIN-MBP-03 sample, Microsoft Teams appears as an app record (2.com.microsoft.teams2, bundle identifier com.microsoft.teams2, URL /Applications/Microsoft Teams.app), attributed to Microsoft's team UBF8T346G9. The Microsoft AutoUpdate agent is a legacy plist in /Library/LaunchAgents, but its plist has AssociatedBundleIdentifiers set to com.microsoft.autoupdate2, so Login Items shows it as Microsoft AutoUpdate rather than by its label.

Managed items

Organizations can approve items in advance with the managed login items payload. Apple's deployment guide lists its rule types: bundle identifier, bundle identifier prefix, team identifier, launchd label and label prefix. An item that matches a rule is approved automatically, and the user gets a single notification about managed items. Endpoint Security marks such items with a managed flag, and sfltool dumpbtm prints the UUIDs of loaded service management payloads.

Two later additions from the same guide: macOS 14 added a declarative status report for background tasks, and on macOS 26, if a background task keeps running after the user quits its app, the user is asked whether to allow it, unless an MDM rule covers the app.

For an investigator, a managed item is one the organization approved. That is not proof it is benign: compare the rule with what the item actually is.

What this means for an investigation

  • Scan the store, not only the folders. A helper registered with SMAppService has no plist in /Library/LaunchAgents or ~/Library/LaunchAgents. Its only trace outside the app bundle is the BTM record.
  • Check where the app lives. A helper app registered from ~/Downloads or a temporary folder deserves more attention than one in /Applications.
  • Check the bundle, not only the record. An attacker who controls an app bundle controls the helpers in it. The record shows the team BTM attributed; verify the helper's own signature with codesign.
  • Collect the app if you can. BTM Parser reads the BTM record and the launch plists from the usual launchd folders. The plist of an in-bundle helper is inside the app, so collect the app when you need it.

FAQ

What replaced SMLoginItemSetEnabled and SMJobBless?

SMAppService, available since macOS 13. Apple deprecated both older calls in macOS 13. SMAppService registers the main app, helper login items, launch agents and launch daemons that live inside the app bundle.

Where are the plists of SMAppService agents and daemons?

Inside the app bundle, in Contents/Library/LaunchAgents and Contents/Library/LaunchDaemons. They use the BundleProgram key, a path relative to the bundle. They are not in /Library/LaunchAgents or ~/Library/LaunchAgents.

Does an SMAppService daemon start as soon as it is registered?

No. Apple documents that the system does not bootstrap a daemon registered this way until an administrator approves it in System Settings. Agents and login items start right away.

How do I tell an SMAppService item from a legacy plist in BTM?

By the legacy bit of the type. sfltool dumpbtm prints legacy agent or legacy daemon for plists installed in launchd folders, and agent or daemon without the prefix for items registered by an app. Endpoint Security exposes the same distinction as a legacy flag.

Frequently asked questions

What replaced SMLoginItemSetEnabled and SMJobBless?

SMAppService, available since macOS 13. Apple deprecated both older calls in macOS 13. SMAppService registers the main app, helper login items, launch agents and launch daemons that live inside the app bundle.

Where are the plists of SMAppService agents and daemons?

Inside the app bundle, in Contents/Library/LaunchAgents and Contents/Library/LaunchDaemons. They use the BundleProgram key, a path relative to the bundle. They are not in /Library/LaunchAgents or ~/Library/LaunchAgents.

Does an SMAppService daemon start as soon as it is registered?

No. Apple documents that the system does not bootstrap a daemon registered this way until an administrator approves it in System Settings. Agents and login items start right away.

How do I tell an SMAppService item from a legacy plist in BTM?

By the legacy bit of the type. sfltool dumpbtm prints legacy agent or legacy daemon for plists installed in launchd folders, and agent or daemon without the prefix for items registered by an app. Endpoint Security exposes the same distinction as a legacy flag.