Post

Replies

Boosts

Views

Activity

Reply to Module dependency cycle errors in Xcode 26
I'm having a real tough time replicating the error in some brand new packages (even though they seem essentially the same) but I have been able to isolate the issue in my two custom packages to where I can sort of see when the error exists. I have a package A that has a dependency on package B (which has two products). If I include a single Swift file in both packages with no source code it works but if I just add a single import SwiftUI statement to both package A and package B's singular file the error presents itself. I see the following note also attached in the build error: note: Swift Overlay dependency of 'SwiftUI' on 'UIKit' via Clang module dependency: 'SwiftUI.swiftmodule -> SwiftUI.pcm -> UIKit.pcm' (in target '' from project '')
Nov ’25
Reply to Module dependency cycle errors in Xcode 26
Hey Ed, thanks for replying! I tried to create a minimally reproducible example with some barebones packages and wasn't able to see the error. I then tried to remove all of the source code from the two packages where I was seeing the error and no longer get the build error. I'll try to do it piecewise to see exactly when I start getting the error and hopefully fix it or at least it can be more instructive in a bug report.
Nov ’25
Reply to Cannot resolve dependencies when using a test only target from Swift Package
I forgot to include in the post, but we found a hack that works but it is pretty annoying. If we duplicate all of "Library"'s dependencies in "LibaryTestUtilities" we can get it to work, though it requires building the host application's target otherwise we will get the error No such module Library when building LibraryTestUtilities. Obviously this is not ideal so we would like to find a solution that allows us to use the testing utilities package without needing to add them to the main app. Ideally, they should only be linked in the test target.
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’22
Reply to Module dependency cycle errors in Xcode 26
I captured a video of the bizarre behavior and included it as an attachment in the report I just submitted here. Please do not hesitate to reach out! The feedback ID is FB21002128.
Replies
Boosts
Views
Activity
Nov ’25
Reply to Module dependency cycle errors in Xcode 26
I'm having a real tough time replicating the error in some brand new packages (even though they seem essentially the same) but I have been able to isolate the issue in my two custom packages to where I can sort of see when the error exists. I have a package A that has a dependency on package B (which has two products). If I include a single Swift file in both packages with no source code it works but if I just add a single import SwiftUI statement to both package A and package B's singular file the error presents itself. I see the following note also attached in the build error: note: Swift Overlay dependency of 'SwiftUI' on 'UIKit' via Clang module dependency: 'SwiftUI.swiftmodule -> SwiftUI.pcm -> UIKit.pcm' (in target '' from project '')
Replies
Boosts
Views
Activity
Nov ’25
Reply to Module dependency cycle errors in Xcode 26
Hey Ed, thanks for replying! I tried to create a minimally reproducible example with some barebones packages and wasn't able to see the error. I then tried to remove all of the source code from the two packages where I was seeing the error and no longer get the build error. I'll try to do it piecewise to see exactly when I start getting the error and hopefully fix it or at least it can be more instructive in a bug report.
Replies
Boosts
Views
Activity
Nov ’25
Reply to Unable to resolve dynamically linked SPM target in Xcode 15
By the way, the actual build error is ld: Undefined symbols:.
Replies
Boosts
Views
Activity
Nov ’23
Reply to Cannot resolve dependencies when using a test only target from Swift Package
My "accepted" answer was actually a false positive as this still leads to linker errors when trying to build the test target.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to Cannot resolve dependencies when using a test only target from Swift Package
I was able to solve this transitive dependency resolution issue by adding the testing utilities product target via the test target's "Target Dependencies" section within "Build Phases", instead of through "Link Binary With Libraries"
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to Cannot resolve dependencies when using a test only target from Swift Package
I forgot to include in the post, but we found a hack that works but it is pretty annoying. If we duplicate all of "Library"'s dependencies in "LibaryTestUtilities" we can get it to work, though it requires building the host application's target otherwise we will get the error No such module Library when building LibraryTestUtilities. Obviously this is not ideal so we would like to find a solution that allows us to use the testing utilities package without needing to add them to the main app. Ideally, they should only be linked in the test target.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to Disable background taps while SwiftUI Menu is active?
I've also noticed that using DispatchQueue to introduce a tiny delay (0.01 seconds) when toggling the binding variable controlling sheet presentation (in the sample case sheetOpen) seems to prevent the dual presentation error
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to Disable background taps while SwiftUI Menu is active?
It's also worth noting that I have not been able to reproduce this issue on SwiftUI Previews, for what it's worth
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’22