WWDC 2021 brought us a variety of new features to Swift. In this article, I will be listing my top picks to watch this year. I spent the last week watching all the videos that piqued my interest, but will continue with the rest of the sessions to absorb all the new information I can possibly get out of the WWDC.
What is new in Swift
I recommend starting with this one to get the base level of understanding of what is coming.
Meet async/await on Swift
Async/await is coming to Swift! To familiarize yourself with the coming changes, start with the introduction video. After that, there are multiple sessions of use cases with async/await.
The most useful ones I’d recommend to watch are:
“Use async/await with URL Session”
This one is a great way to get rid of the callback hell that is the current way we are handling networking-related tasks.
“Explore structured concurrency in Swift” https://developer.apple.com/videos/play/wwdc2021/10134
This is a great session to watch if you wish to enhance your applications performance with concurrent tasks. Also the new async/await functionality ties into this.
With async/await comes a new AsyncSequence that allows you to iterate over sequences of values over time.
And there are many more! Check out the rest of the related videos from the Meet async/await on Swift video.
What’s new in Foundation
Foundation got some nice new features on localization and pluralisation support. Also the way we are going to use DateFormatter changed a lot. This should be a must watch for all iOS developers.
Analyze HTTP traffic in Instruments
With new Xcode we are getting a way to analyze HTTP traffic using the Network template. Previously we did not have an Apple-provided way of doing this, but this year it is going to change. The new feature looks to be really powerful and I’m looking forward to testing it out.
What’s new in SwiftUI
There is no doubt that SwiftUI will be the future of UI coding on Apple platforms. This year we are getting much needed new functionalities and performance improvements. I don’t think there no longer is any reason to not start a new project with SwiftUI.
Punos has written a separate blog post about the state of SwiftUI. You can read it at: https://www.punosmobile.com/en/blog/swiftui-valmis-kehittajille-2021/