fix: app target fails to build under Xcode 26 beta (#ImplicitStrongCapture)#2162
Open
jasonpaulso wants to merge 1 commit into
Open
fix: app target fails to build under Xcode 26 beta (#ImplicitStrongCapture)#2162jasonpaulso wants to merge 1 commit into
jasonpaulso wants to merge 1 commit into
Conversation
The outer onReceive closure captured controller strongly while the nested onComplete closure declared [weak controller]; newer Swift toolchains (Xcode 26 beta) reject the mismatch under #ImplicitStrongCapture and the app target fails to build. Capture weakly at the outer closure as the nested one already intends. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the SwiftUI .onReceive handler for first-launch readiness to adjust capture semantics (likely aiming to prevent an unintended strong reference).
Changes:
- Adds a
[weak controller]capture list to the.onReceive(controller.$isFirstLaunchReady)closure.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } label: { | ||
| menuBarIcon | ||
| .onReceive(controller.$isFirstLaunchReady) { ready in | ||
| .onReceive(controller.$isFirstLaunchReady) { [weak controller] ready in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The outer
onReceiveclosure inEXOApp.swiftcapturescontrollerstrongly while the nestedonCompleteclosure declares[weak controller]. Newer Swift toolchains (Xcode 26 beta) reject this mismatch under#ImplicitStrongCapture:so the EXO app target no longer builds. One-liner: capture weakly at the outer closure, matching the intent the nested closure already expresses.
Verified building the app with both Xcode 26.5 (current) and the Xcode 26 beta toolchain.
🤖 Generated with Claude Code