Did you find this tip useful? Are you planning on using it in your apps? Let me know in the comments 🚀
@dr.shrimppuertorico74673 жыл бұрын
Yes, love your quick to the point videos.
@waheedafolabi69293 жыл бұрын
It's very useful and even though I don't have a use case for it at the moment, it's saved in my playlist for easy reference.
@poesalec33303 жыл бұрын
How do I use async funtions in my app? When I have an async function getUsers which returns an array of users, how do I use that in my UIButton actions or viewDidLoad?
@v_pradeilles3 жыл бұрын
That's a good question! Short answer: you need to use the global `async()` function. There's a more detailed explanation in this article 👉 wwdcbysundell.com/2021/calling-async-apis-from-synchronous-contexts/
@waheedafolabi69293 жыл бұрын
Thanks for the great content you are providing. I wondered why it took me so long to discover your channel. What's required to be an SDK developer? Could you build a full app where you show your thought process with implementation of SOLID principle and clean code architecture?
@developerios60963 жыл бұрын
I wont negate (for me at least) this approach comes with additional complexity, or maybe its just because we are not confident with this new approach. I do understand some of the closure drawbacks, like retain cycles, pyramids of doom(which really destroy readability), but to me, if you have an easy task(i mean no complex, short amount of code) completion could still be considered the way to go. What you think Vincent? Would you replace all your completion based functions to follow this new approach? Good video anyway, you managed to handle the complexity making it a bit easier
@v_pradeilles3 жыл бұрын
Honestly I think Apple will push this pattern so much in their code examples and tutorials that it will become the norm in a couple of years. I agree that for the "simple" use case completionHandlers are quite nice, however they don't scale well and we know by experience that "simple" use case always tend to become more complex over the lifetime of a project...