Skip to content

fix(macOS): Launch on Login#9773

Merged
i2h3 merged 2 commits into
masterfrom
i2h3/fix/9761-launch-on-login
Apr 2, 2026
Merged

fix(macOS): Launch on Login#9773
i2h3 merged 2 commits into
masterfrom
i2h3/fix/9761-launch-on-login

Conversation

@i2h3

@i2h3 i2h3 commented Apr 2, 2026

Copy link
Copy Markdown
Collaborator

Fixes #9761 by updating the code to use the Service Management framework which became available with macOS 13 which also is our minimum deployment target. This is an API compatible with sandboxed apps which no longer uses deprecated APIs to meddle in system files outside the app sandbox.

On macOS, users can manage login items in the central system settings. Switches in the user interface of third-party apps are only a redundant convenience alternative.

Screenshots

Bildschirmfoto 2026-04-02 um 11 01 47 Bildschirmfoto 2026-04-02 um 11 02 08

@i2h3 i2h3 self-assigned this Apr 2, 2026
@i2h3 i2h3 requested a review from Copilot April 2, 2026 09:04
@i2h3 i2h3 added bug os: 🍎 macOS Apple macOS, formerly also known as OS X labels Apr 2, 2026
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 💻 Desktop Clients team Apr 2, 2026
@i2h3 i2h3 moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 💻 Desktop Clients team Apr 2, 2026
@i2h3 i2h3 added this to the 33.0.3 milestone Apr 2, 2026
@i2h3

i2h3 commented Apr 2, 2026

Copy link
Copy Markdown
Collaborator Author

/backport to stable-33.0

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates macOS “Launch on Login” handling to use the modern Service Management framework (macOS 13+), keeping the UI and stored config in sync with the actual system login-item state.

Changes:

  • Replace plist-based login-item detection/toggling with SMAppService on macOS.
  • Update the settings UI to read the real login-item state and re-sync after toggles.
  • Link the ServiceManagement framework on Apple builds.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/gui/generalsettings.cpp Populate and re-sync the autostart checkbox based on actual OS login-item state.
src/csync/CMakeLists.txt Add ServiceManagement framework linking for Apple builds.
src/common/utility_mac.mm Implement login-item state/toggling via SMAppService instead of LaunchAgents plist manipulation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/common/utility_mac.mm Outdated
Comment thread src/common/utility_mac.mm Outdated
Comment thread src/csync/CMakeLists.txt Outdated
Comment thread src/gui/generalsettings.cpp
Fixes #9761

Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
@i2h3 i2h3 force-pushed the i2h3/fix/9761-launch-on-login branch from 8664e16 to 13859c6 Compare April 2, 2026 11:05
Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Artifact containing the AppImage: nextcloud-appimage-pr-9773.zip

Digest: sha256:4fbf3a6de2ba128b63ab2bfa9455f336bfc61b03c4ab1e0c46c5cb4f884df91b

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@i2h3 i2h3 merged commit 1375dfb into master Apr 2, 2026
19 of 21 checks passed
@i2h3 i2h3 deleted the i2h3/fix/9761-launch-on-login branch April 2, 2026 12:17
@github-project-automation github-project-automation Bot moved this from 🏗️ In progress to ☑️ Done in 💻 Desktop Clients team Apr 2, 2026
@mgallien mgallien modified the milestones: 33.0.3, 34.0.0 Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug os: 🍎 macOS Apple macOS, formerly also known as OS X

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Launch on System Startup" no longer works

4 participants