fix(macOS): Resolved Some Xcode Compiler Warnings#9500
Conversation
|
/backport to stable-33.0 |
There was a problem hiding this comment.
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_asyncblocks 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.
...ration/MacOSX/NextcloudIntegration/FileProviderExt/FileProviderExtension+CustomActions.swift
Outdated
Show resolved
Hide resolved
...gration/MacOSX/NextcloudIntegration/FileProviderUIExt/Sharing/ShareTableViewDataSource.swift
Show resolved
Hide resolved
|
Artifact containing the AppImage: nextcloud-appimage-pr-9500.zip Digest: 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. |
… 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>
36e9034 to
2940c41
Compare
|



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