Skip to content

Replace UNIX sockets with XPC on macOS#9463

Draft
i2h3 wants to merge 1 commit intomasterfrom
i2h3/feature/9430-all-xpc
Draft

Replace UNIX sockets with XPC on macOS#9463
i2h3 wants to merge 1 commit intomasterfrom
i2h3/feature/9430-all-xpc

Conversation

@i2h3
Copy link
Collaborator

@i2h3 i2h3 commented Feb 17, 2026

The extensions shipped with our app should use XPC exclusively for interprocess communication and drop UNIX file sockets.

This needs to be integrated early in the development cycle for 34.0.0 and without a backport due to its impact and to maximize the verification time.

Copilot AI review requested due to automatic review settings February 17, 2026 10:54
@i2h3 i2h3 self-assigned this Feb 17, 2026
@i2h3 i2h3 added os: 🍎 macOS Apple macOS, formerly also known as OS X feature: 🐚 shell integration 3. to review feature: 📁 file provider macOS File Provider Extension, more general also known as virtual file system. labels Feb 17, 2026
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 💻 Desktop Clients team Feb 17, 2026
@i2h3 i2h3 moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 💻 Desktop Clients team Feb 17, 2026
@i2h3 i2h3 force-pushed the i2h3/feature/9430-all-xpc branch from 95d425a to e0d96a5 Compare February 17, 2026 10:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request replaces UNIX socket-based IPC with XPC (Apple's Inter-Process Communication) for communication between the Nextcloud desktop client and its macOS FinderSync extension. This modernizes the macOS integration to use Apple's recommended XPC framework instead of file-based sockets.

Changes:

  • Introduced XPC-based communication infrastructure (FinderSyncXPC, FinderSyncService, FinderSyncXPCManager) to replace socket-based communication
  • Removed legacy socket server components (FileProviderSocketServer, FileProviderSocketController, FinderSyncSocketLineProcessor)
  • Added XPC protocol definitions (FinderSyncProtocol, FinderSyncAppProtocol) for bidirectional communication
  • Updated FinderSync extension to use XPC client instead of socket client
  • Maintained SocketApi as the core business logic layer (reused for XPC transport)

Reviewed changes

Copilot reviewed 34 out of 35 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
src/gui/macOS/findersyncxpc_mac.mm New XPC listener implementation for accepting FinderSync connections
src/gui/macOS/findersyncxpc.h XPC manager interface for broadcasting status updates to extensions
src/gui/macOS/findersyncservice.mm XPC service delegate implementing FinderSyncAppProtocol for extension requests
src/gui/macOS/findersyncservice.h Service interface wrapping SocketApi for XPC transport
src/gui/socketapi/socketapi.cpp Added XPC broadcast support alongside socket broadcasts
src/gui/socketapi/socketapi.h Added friend declaration for FinderSyncService to access FileData
src/gui/application.cpp Initialize XPC infrastructure on macOS
shell_integration/.../FinderSyncXPCManager.m XPC client for FinderSync extension to connect to main app
shell_integration/.../FinderSync.m Migrated from socket client to XPC manager
src/gui/macOS/fileprovidersocketserver*.* Removed legacy socket server (File Provider uses XPC now)
src/gui/CMakeLists.txt Updated build to include new XPC files and remove socket files

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

@i2h3 i2h3 force-pushed the i2h3/feature/9430-all-xpc branch from e0d96a5 to d9f2bba Compare February 17, 2026 12:17
@i2h3 i2h3 added this to the 33.0.0 milestone Feb 17, 2026
@i2h3 i2h3 force-pushed the i2h3/feature/9430-all-xpc branch from d9f2bba to f521a65 Compare February 17, 2026 13:44
@i2h3 i2h3 requested a review from Copilot February 17, 2026 13:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 33 out of 33 changed files in this pull request and generated 2 comments.


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

Copy link
Member

@nilsding nilsding left a comment

Choose a reason for hiding this comment

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

Some comments for now -- couldn't manage to get the FinderSync XPC connection working in a local dev setup due to sandboxing issues :(

@i2h3 i2h3 force-pushed the i2h3/feature/9430-all-xpc branch from f521a65 to e630785 Compare February 18, 2026 07:43
@i2h3 i2h3 removed this from the 33.0.0 milestone Feb 18, 2026
@i2h3 i2h3 marked this pull request as draft February 18, 2026 08:41
@i2h3 i2h3 modified the milestone: 33.0.0 Feb 18, 2026
@i2h3 i2h3 modified the milestones: 33.1.0, 33.0.1, 34.0.0 Feb 26, 2026
Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
@i2h3 i2h3 force-pushed the i2h3/feature/9430-all-xpc branch from e630785 to 0a25197 Compare March 17, 2026 14:00
@github-actions
Copy link

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

Digest: sha256:a93463f8cf0379f37998b04bd98859e538f50fb99eb7fcaa1a4507e88a25f157

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.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Maintainability Rating on New Code (required ≥ A)
51 New Code Smells (required ≤ 0)
D Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@i2h3 i2h3 changed the title feat(macOS): Replace UNIX sockets with XPC Replace UNIX sockets with XPC on macOS Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review feature: 📁 file provider macOS File Provider Extension, more general also known as virtual file system. feature: 🐚 shell integration os: 🍎 macOS Apple macOS, formerly also known as OS X

Projects

Status: 🏗️ In progress

Development

Successfully merging this pull request may close these issues.

3 participants