Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update app.{set|get}LoginItemSettings(settings) #37244

Merged
merged 4 commits into from Oct 16, 2023

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Feb 13, 2023

Description of Change

Closes #37560.
Refs #37228
Refs electron/governance#533

This PR updated app.setLoginItemSettings(settings) and app.getLoginItemSettings(settings) on macOS 13 to use a single streamlined underlying API on both Mac App Store and regular macOS builds. This will remove several configuration and settings options, including openAsHidden in app.setLoginItemSettings and wasOpenedAtLogin and wasOpenedAsHidden in app.getLoginItemSettings.

This simplifies the underlying logic in accordance to the APIs apple has outlined for usage and improve parity between MAS and non-MAS builds. This will also allow developers to register app service objects, launch daemons, and login item services to launch on startup.

Checklist

Release Notes

Notes: Migrated app.{set|get}LoginItemSettings(settings) to use Apple's new recommended underlying framework on macOS.

@codebytere codebytere added the semver/major incompatible API changes label Feb 13, 2023
@electron-cation electron-cation bot added api-review/requested 🗳 new-pr 🌱 PR opened in the last 24 hours labels Feb 13, 2023
@codebytere codebytere force-pushed the support-smappservice branch 7 times, most recently from 03e8bcf to 8e60529 Compare February 14, 2023 11:26
docs/api/app.md Outdated Show resolved Hide resolved
@codebytere
Copy link
Member Author

Note: macOS is failing becuase it needs a more recent SDK. Chromium has updated it upstream already, so this will be fixed as soon as https://github.com/electron/electron/pull/37130/files#diff-920de4a8729bdf120a0908a0f013f2e3a0e7c40acf0fdc961bbff77ca9106929L57 lands and this can be rebased.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Feb 20, 2023
@codebytere codebytere marked this pull request as ready for review April 19, 2023 12:07
@electron-cation electron-cation bot added new-pr 🌱 PR opened in the last 24 hours and removed new-pr 🌱 PR opened in the last 24 hours labels Apr 19, 2023
@quanglam2807
Copy link
Contributor

Is this blocked by something, @codebytere?

docs/api/app.md Outdated Show resolved Hide resolved
docs/api/app.md Outdated Show resolved Hide resolved
Copy link
Member

@erickzhao erickzhao left a comment

Choose a reason for hiding this comment

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

API LGTM

Copy link
Member

@VerteDinde VerteDinde left a comment

Choose a reason for hiding this comment

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

LGTM - test failures are unrelated

Copy link
Contributor

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

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

API LGTM

@codebytere codebytere force-pushed the support-smappservice branch 4 times, most recently from 1318fd3 to ef3b84e Compare September 28, 2023 08:22
docs/api/app.md Outdated Show resolved Hide resolved
@jkleinsc jkleinsc merged commit f7b1c75 into main Oct 16, 2023
15 checks passed
@jkleinsc jkleinsc deleted the support-smappservice branch October 16, 2023 16:25
@release-clerk
Copy link

release-clerk bot commented Oct 16, 2023

Release Notes Persisted

Migrated app.{set|get}LoginItemSettings(settings) to use Apple's new recommended underlying framework on macOS.

felixrieseberg pushed a commit to felixrieseberg/electron that referenced this pull request Oct 25, 2023
* feat: update app.{set|get}LoginItemSettings(settings)

* test: fixup and add tests

* docs: add type link

* chore: name -> serviceName
MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
* feat: update app.{set|get}LoginItemSettings(settings)

* test: fixup and add tests

* docs: add type link

* chore: name -> serviceName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Open at login with setLoginItemSettings in MAS build is not working
6 participants