I want to know my project use swiftUI 3 or swiftUI 4 .
env xcode 13.2.1
i hav try to google for answer , and read the apple documentation, and look setting of project and settings of Xcode's preference.
The SwiftUI version relates to the iOS version. You could verify the version using the available API
if #available(iOS 13, *) {
// SwiftUI 1.0
} else if #available(iOS 14, *) {
// SwiftUI 2.0
} else if #available(iOS 15, *) {
// SwiftUI 3.0
} else if #available(iOS 16, *) {
// SwiftUI 4.0
}
Here you can find some solutions here