For some reason when I type in the search field it does not print out Xcode console the \"str\". What am I missing here? I followed his tutorial https://www.letsbuildthatapp.com
You are creating a Sink object with the .sink
method, but you are not storing it anywhere. Therefore it goes out of existence immediately and there is no pipeline to publish to.
The correct procedure here is to have an instance property typed as Set<AnyCancellable>
and call store(in:)
on your sink to store it in that instance property. Now it will persist and there will be something to print out.