Skip to content

fix(macOS): Resolved Some Xcode Compiler Warnings#9500

Merged
i2h3 merged 2 commits intomasterfrom
i2h3/fix/compiler-warnings
Feb 24, 2026
Merged

fix(macOS): Resolved Some Xcode Compiler Warnings#9500
i2h3 merged 2 commits intomasterfrom
i2h3/fix/compiler-warnings

Conversation

@i2h3
Copy link
Collaborator

@i2h3 i2h3 commented Feb 24, 2026

Mostly Swift and Objective-C warnings about concurrency and unused identifiers and such things.

@i2h3 i2h3 added this to the 33.0.0 milestone Feb 24, 2026
@i2h3 i2h3 self-assigned this Feb 24, 2026
Copilot AI review requested due to automatic review settings February 24, 2026 10:39
@i2h3 i2h3 added the bug label Feb 24, 2026
@i2h3 i2h3 added the os: 🍎 macOS Apple macOS, formerly also known as OS X label Feb 24, 2026
@github-project-automation github-project-automation bot moved this to 🧭 Planning evaluation (don't pick) in 💻 Desktop Clients team Feb 24, 2026
@i2h3
Copy link
Collaborator Author

i2h3 commented Feb 24, 2026

/backport to stable-33.0

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 PR targets macOS build cleanliness by addressing several Xcode compiler warnings in the Nextcloud desktop client’s macOS shell integration components.

Changes:

  • Avoids strong captures in Objective-C dispatch_async blocks by using weak/strong self patterns.
  • Updates Swift code to remove unused-variable warnings and adopts async FileProvider identifier lookup.
  • Adjusts Swift imports/loops to reduce concurrency and unused-result warnings.

Reviewed changes

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

Show a summary per file
File Description
shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/FinderSyncSocketLineProcessor.m Uses weak/strong self inside main-queue dispatch blocks to avoid retain warnings.
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Sharing/ShareTableViewDataSource.swift Replaces manual continuation wrapper with async NSFileProviderManager.identifierForUserVisibleFile(at:) call.
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Locking/LockViewController.swift Removes an unused local by discarding the async call result.
shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Authentication/AuthenticationViewController.swift Removes unused/dead code paths to eliminate warnings.
shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension+Thumbnailing.swift Uses @preconcurrency import FileProvider to reduce Swift concurrency warnings.
shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension+CustomActions.swift Discards unused task-group iteration results (but progress reporting needs a fix).

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

@github-actions
Copy link

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

Digest: sha256:b000460d54ffd76f2a5d4b1c31113f1a01c2702ab1032ae49fa10cdcadf2a4d0

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 added 2 commits February 24, 2026 12:32
… in dispatch_async blocks

- Addressed compiler warnings about “block implicitly retains ‘self’” in FinderSyncSocketLineProcessor.m by explicitly handling self capture in all dispatch_async blocks within the process: method.
- For each block that referenced self (STATUS, UPDATE_VIEW, REGISTER_PATH, UNREGISTER_PATH, STRING, GET_MENU_ITEMS BEGIN, and MENU_ITEM), introduced a weak-then-strong self pattern:
   - Declared __weak typeof(self) weakSelf = self; before the block.
   - Inside the block, re-established a strong reference with __strong typeof(self) self = weakSelf; and guarded with if (!self) return;.
- Updated logging inside blocks to use self->_log to ensure explicit self usage.
- Preserved existing logic and behavior for delegate calls and logging while eliminating -Wimplicit-retain-self warnings and reducing risk of retain cycles.

Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
@i2h3 i2h3 force-pushed the i2h3/fix/compiler-warnings branch from 36e9034 to 2940c41 Compare February 24, 2026 11:32
@i2h3 i2h3 moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 💻 Desktop Clients team Feb 24, 2026
@i2h3 i2h3 merged commit 8fa498f into master Feb 24, 2026
16 of 18 checks passed
@i2h3 i2h3 deleted the i2h3/fix/compiler-warnings branch February 24, 2026 11:33
@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 💻 Desktop Clients team Feb 24, 2026
@sonarqubecloud
Copy link

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

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

2 participants