I'm using Xcode 15 15A240d
Similarly to https://developer.apple.com/forums/thread/731732 when I try to run the Xcode previews for watchOS views in a watchOS target I get compilation errors from UIKit code.
This is only valid for Xcode Previews. Building the code normally / Run it on simulator or device works.
I don't understand why Xcode attempts to build iOS code.
my scheme does include the host app for the watch
I made a duplicate of that scheme by unchecking the host app and that makes previews work again.
I'm not sure this is the intended behavior. I double checked and this was not the case with Xcode 14.3.1 I could run the initial target without issues on Xcode previews.
Do you experience the same issue? is this a problem with my scheme settings or an Xcode bug?