vyshane/grpc-swift-combine

Use @Published variable as input streams in bidirectional streams

Closed this issue · 2 comments

krjw commented

Hi,
I am struggling to implement bidirectional streams with a @published variable as input stream. Do you by any chance have an example?

Great library so far!

Greetings krjw

krjw commented

Found the solution:

self.grpc.call(grpcCall)(self.$publishedVariable.setFailureType(to: Error.self).eraseToAnyPublisher()).sink(...)

@krjw sorry for the delayed response. I didn't receive a notification when you created this issue. I've just realised that I'm not watching my own repository! I've now fixed that. Glad to see that you managed to resolve the issue.