i'm using this code with the new searchable modifier available with Xcode-13 beta. is there any way to have some conditional compilation check to compile this with Xcode 12? obviously i can't built with it to those newer platforms but i'd expect it'd be able to compile and deploy to the older platforms.
struct MyView: View {
@State private var searchText = ""
var body: some View {
if #available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *) {
SomeView(searchText: searchText)
.searchable(text: $searchText) // no member 'searchable' error
} else {
// fallback
}
}
}