I've trying to add a SwiftUI view to an existing UIKit + Storyboards based tvOS project. The actual build works fine and I can run in the simulator & see my SwiftUI view, but when I resume the SwiftUI preview I get 'Failed to build MyClass.swift' with the following diagnostics:
I saw this similar SO post regarding the -bundle and -bitcode_bundle cannot be used together
error, but my configuration is already the way the answer suggests (setting the Mach-O type to Executable and ensuring no Bundle Loader is set).
There's also a warning about /Applications/Xcode.app/Contents/SharedFrameworks-appletvsimulator
not being found. That directory certainly does not exist, but nowhere in my project is SharedFrameworks-appletvsimulator
referenced that I can find. Also, if I create a new SwiftUI project it doesn't complain about that.
The SwiftUI code is literally just a new "Hello World" SwiftUI file from the Xcode template - I haven't modified it at all.
Does anyone have any ideas what's going on here or how to fix it?