You can customize the field within onAppear of your view, e.g.:
onAppear
.onAppear { let appearance = UISearchTextField.appearance(whenContainedInInstancesOf: [UISearchBar.self]) appearance.backgroundColor = .red }