Skip to content

chore!: remove deprecated macOS login item API - #52351

Merged
jkleinsc merged 4 commits into
mainfrom
nikwen/remove-old-login-item-api
Aug 5, 2026
Merged

jkleinsc merged 4 commits into
mainfrom
nikwen/remove-old-login-item-api

Conversation

@nikwen

@nikwen nikwen commented Jul 15, 2026 •

Copy link
Copy Markdown
Member

Description of Change

Fixes #52334
Refs #48090

Electron 44 removes support for macOS 12.

This PR removes:

  • The old macOS APIs that we used for login items on macOS 12 and below
  • The related JavaScript attributes that only worked on macOS 12 and below.
  • The migration logic that migrated old login items to the new macOS 13+ API (unnecessary, and we had it for two years).

One benefit of removing the old APIs is fixing a deadlock condition in app.getLoginItemSettings (see #48090 and this Slack message).

Past discussions: #1, #2, #3

Checklist

Release Notes

Notes:

  • Removed openAsHidden option from app.setLoginItemSettings().
  • Removed openAsHidden, wasOpenedAsHidden and restoreState fields from return value of app.getLoginItemSettings().
  • Fixed potential deadlock inside app.getLoginItemSettings() on macOS.

@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Jul 15, 2026
@nikwen nikwen added semver/major incompatible API changes target/44-x-y PR should also be added to the "44-x-y" branch. labels Jul 15, 2026
@nikwen
nikwen force-pushed the nikwen/remove-old-login-item-api branch from 1b96e1c to a44eccb Compare July 15, 2026 02:15
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Jul 22, 2026
@nikwen
nikwen marked this pull request as ready for review July 26, 2026 13:23
@nikwen
nikwen requested a review from a team as a code owner July 26, 2026 13:23
@nikwen nikwen mentioned this pull request Jul 26, 2026
5 of 7 tasks

@ckerr ckerr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code changes LGTM. 👍

I have not mentioned the macOS-level migration logic from that quote in the breaking changes doc as I couldn't find other sources backing this up besides the Slack message with manual testing done by a maintainer. (Public documentation in this area is sparse.)

Unless there's reason to disbelieve the claim, we should consider including it in the breaking changes doc in some form. If it's uncertain, maybe we could add phrasing like "may" e.g. "may see openAtLogin: false while the app still launches at login. This is easily fixed by..."

@nikwen

nikwen commented Jul 29, 2026 •

Copy link
Copy Markdown
Member Author

Thanks for the review, @ckerr!

So I just tested this with the help of Claude on macOS 26.6.

It seems like both the legacy APIs and the new API read and write to the same internal store. Registering an app through one of them is readable through the other and vice-versa. This matches the existing testing by another maintainer.

So I'll simply remove that part from the breaking changes section. It's nothing that app developers need to worry about.

@nikwen
nikwen force-pushed the nikwen/remove-old-login-item-api branch from 827cdcd to c361239 Compare July 29, 2026 17:22
@nikwen
nikwen requested a review from ckerr July 29, 2026 17:28
@nikwen
nikwen force-pushed the nikwen/remove-old-login-item-api branch from c361239 to ac3f5fc Compare July 30, 2026 21:37
@nikwen

nikwen commented Jul 30, 2026

Copy link
Copy Markdown
Member Author

Rebased to fix merge conflicts.

@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Aug 2, 2026

@jkleinsc jkleinsc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API LGTM

@erickzhao erickzhao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API LGTM

@jkleinsc
jkleinsc merged commit cca2d62 into main Aug 5, 2026
74 checks passed
@jkleinsc
jkleinsc deleted the nikwen/remove-old-login-item-api branch August 5, 2026 14:08
@release-clerk

release-clerk Bot commented Aug 5, 2026

Copy link
Copy Markdown

Release Notes Persisted

  • Removed openAsHidden option from app.setLoginItemSettings().
  • Removed openAsHidden, wasOpenedAsHidden and restoreState fields from return value of app.getLoginItemSettings().
  • Fixed potential deadlock inside app.getLoginItemSettings() on macOS.

@github-actions github-actions Bot added the 45-x-y label Aug 5, 2026
@trop

trop Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "44-x-y", please check out #52667

@trop trop Bot added in-flight/44-x-y and removed target/44-x-y PR should also be added to the "44-x-y" branch. labels Aug 5, 2026
@trop trop Bot added merged/44-x-y PR was merged to the "44-x-y" branch. and removed in-flight/44-x-y labels Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

45-x-y api-review/approved ✅ merged/44-x-y PR was merged to the "44-x-y" branch. semver/major incompatible API changes

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Remove old login item code

4 participants