Skip to content

Remove old login item code #52334

Closed

Description

@nikwen

Electron 44 will remove support for macOS 12.

Login items use a new macOS API on macOS 13+ and an old one on macOS 12 and below.

Because we no longer support macOS 12, we can remove the code that uses the old API.

This is where it is implemented:

if (@available(macOS 13, *)) {
// If the app was previously set as a LoginItem with the old API, remove it
// as a LoginItem via the old API before re-enabling with the new API.
const std::string status =
platform_util::GetLoginItemEnabled("mainAppService", "");
if (status == "enabled-deprecated") {
base::mac::RemoveFromLoginItems(bundle_path);
if (settings.open_at_login) {
platform_util::SetLoginItemEnabled(settings.type, settings.service_name,
settings.open_at_login);
}
} else {
platform_util::SetLoginItemEnabled(settings.type, settings.service_name,
settings.open_at_login);
}
} else {
if (settings.open_at_login) {
base::mac::AddToLoginItems(bundle_path, settings.open_as_hidden);
} else {
base::mac::RemoveFromLoginItems(bundle_path);
}
}

Activity

  1. added theissue type on Jul 14, 2026
  2. added
    upgrade-follow-up
    on Jul 14, 2026
  3. self-assigned this
    on Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

component/appupgrade-follow-up

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions