The #SwiftUI .searchable() modifier has to be hands down, the most unreliable, inconsistent API to ever come out of Apple.
Not only does the behaviour of it change drastically between dot releases, it's next to impossible to get it to behave in a coherent way across all platforms.
I shouldn't install a minor OS update and have my app change like this. SwiftUI is so bad at this.
And no, I don't want to spend hours filing a feedback!
On iPad, hitting search will hide the suggestions.
On iPhone, hitting search does nothing, they just get stuck there. https://mastodon.notsobig.co/@phill/110163933612089969
And this is code pretty much lifted from Apple's own docs. Maddening. https://gist.github.com/phillipcaudell/d7282b58f90c8be7e83c27ce78b6d44a
@phill On macOS, the search field has a broken background
Also, when you have tokens that show up when a specific character is typed (in my case #), the tokens don't show up if you've written literally anything else in the field before. Even if you delete everything and try pressing #, the tokens just don't show up
@phill Also, on macOS, it's impossible to focus the search field with a keyboard shortcut.
@davidbures @phill Spend some time today trying to find a fix for this broken search field in the sidebar – yet without success.
On iPhone, the suggestions will appear on presentation (great!), but if you tap a suggestion, then type just a little too fast, the caret position gets messed up.
Do this enough, it'll eventually crash, throwing an exception from some private _UIObscurableTextContentStorage class.