Hey iOS developer! 👋
Writing asynchronous code has always been a bit of a challenge for iOS developers. From completion handlers to dispatch queues, it was always a struggle to read through nested code.
In this issue of Curated iOS, I’m diving into async/await, which helps eliminate the complexity of callbacks.
Async await in Swift explained with code examples
Get an introduction to async/await, complete with refactoring examples. Antoine van der Lee covers the basics of async/await and shares his perspective on the future of the Result
enum used in closure-based asynchronous methods.
Read on SwiftLee blog
Unit Testing with async/await
Good code always comes with proper testing, and this is where Jacob Bartlett’s article comes in handy. He demonstrates how to set up your first unit tests for async/await code.
Read on Jacob’s Tech Tavern
How to Use URLSession with Async/Await for Network Requests in Swift
Since most apps require data to be downloaded from the internet, iOS applications extensively use the URLSession
API to fetch data. In this article, Antoine van der Lee explains how to implement URLSession
network requests with async/await and properly handle errors.
Read on SwiftLee blog
Curated iOS newsletter subscribers can now get access to exclusive deals and discounts from our newsletter friends and partners! Check out the Subscriber benefits page for more details and subscribe if you haven’t already!
Efficiently Migrating from Completion Handlers to Async-Await in Swift
In this article, Ankita Kotadia explains how to update existing code with completion handlers using withCheckedContinuation
. Author also discusses how to call async functions sequentially and concurrently.
Read on Medium
3 mistakes to avoid with async / await
Vincent Pradeilles highlights common mistakes developers might make when working with async/await code.
Read on Swift with Vincent blog
If you found this Curated iOS issue useful, I’d be happy if you:
Hit the Like button.
Subscribe, if you haven’t already!
Connect with me on LinkedIn.
Until next time!
Artjoms