-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Swift Concurrency (async/await) #299
Comments
Hi @ondrejkorol, Thanks for reporting this. Yes, we have plans to add support for Swift Concurrency, first for The ETA is end by the end of Q2 (if we don't have any unplanned change of priorities). We will update you on this ticket when this is available. Best, Martin |
would love to see async support, as we build new iOS16+ app |
Since the release 4.56.0, we have a new state layer that supports Swift Concurrency: https://getstream.io/chat/docs/sdk/ios/client/state-layer/state-layer-overview/. Let us know what you think. |
That's amazing! I'll be happy to try it out. Great work! 👏 |
What are you trying to achieve?
In our codebase, we try to leverage the latest Swift features. For asynchronous calls, we're using the new Swift concurrency framework. I see that currently, Stream Chat SDK doesn't provide async/await methods. The same goes for @ MainActor support.
As a result, we sometimes have issues connecting the rest of the codebase with Stream Chat.
Are there any plans regarding supporting Swift Concurrency?:)
If possible, how can you achieve this currently?
Currently, we can bridge completion handlers with the native APIs like
withChecked(Throwing)Continuation
etc. But still, there are some parts, like the handling of MainActor, that need compromises (nonisolated keywords, DispatchQueue.async.main etc)What would be the better way?
GetStream Environment
GetStream Chat version: 4.29.0
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version: 15+
Swift version: 5
Xcode version: 14.2
The text was updated successfully, but these errors were encountered: