Hi,
I am having the following issue with multiple targets in a workspace and SwiftUI previews and am wondering, if that's a bug or a feature?
I have a workspace containing an iOS and a watchOS target. Both targets have a source file with the name "FooView.swift" in them, which implements the same UI (using SwiftUI of course), but specific for the particular platform. When trying to use SwiftUI previews after switching targets it only works after a full clean of the project. I assume this is because either the filenames or class names clash somewhere.
The other issue I saw is that HostingController.swift filename (generted by Xcode) clashes with some generated HostingController.swift file used by the SwiftUI previews in the iOS target. To be clear the iOS target has no HostingViewController.swift. I assume it's generated to "host" the SwiftUI preview. After renaming only the file (not the class) to WatchHostingViewContoller.swift everything was working again.
So I am wondering if that should be considered expected behaviour or bugs?
Thank you, Michael