I have the same issue
So I added @available(iOS 17.0, *) in front of the #Preview{} and It works
@available(iOS 17.0, *)
#Preview {
// Your Code
}
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: