only works for ios 13 or later
you can still attach your SwiftUI code by using
@available(iOS 13.0, *)
if you still using Xcode below Xcode 11 and have SwiftUI code, you can wrap it with
#if canImport(SwiftUI)
...
#endif
This can fix the issue when compiling with Xcode below Xcode 11