DEV Community

Cover image for WWDC 2021: State of the Union Recap
Joseph Maurer
Joseph Maurer

Posted on

WWDC 2021: State of the Union Recap

Here’s a quick recap of Apple’s State of the Union at WWDC (World Wide Developer Confrence 2021). You can find the full video here.

XCode Build

alt_text

A new continuous integration and delivery service built right into Xcode and hosted in the cloud, Xcode Build is Apple’s take on simplifying the process of building an app while helping you focus on what’s important. It helps you offload your builds, test, and code signing for distribution. It publishes your result right back into Xcode’s report navigator so you never have to switch context out of where you are building your app.

One cool feature is that you can have the build notify you when it completes and publish it to your Slack or any other service. There is also a public API that you can dive into for grabbing information about your builds. I can see how building apps this way is way more integrated and convenient. This actually seems like a fun way to write tests for your app!

Code reviews also look to make massive improvements on commenting and reviewing code. The new views allow you to select between multiple ways to see what code has changed, and even view comments as you are fixing any potential bugs. Anyone who does code reviews how confusing it can get when there are multiple revisions and files removed or added to a pull request.

Swift Concurrency Support

Most developers and engineers are used to the idea of writing concurrent code as it’s such a vital part of making fast and responsive code.

Concurrency enables your apps to perform multiple tasks at the same time, which helps your apps stay responsive to user input while doing work in the background, like a weather app fetching forecast data while the user selects a city.

The problem? Swift never had native support for concurrent code, so it was unnecessarily difficult to write good concurrent code. Apple’s new approach to this is Structured Concurrency. Actors are an industry standard and are vital to safe concurrent programming.

Conceptually, an actor is an object that protects its own state by only providing mutually exclusive access. This completely eliminates concurrent access and the low-level data races that come with it.

Actors’ are now a first class citizen in Swift and have a much simpler declaration:

alt_text

Another benefit is MainActor, which lets you decorate a function to always run on the main thread. This is vital for API calls that are needed for the UI.

alt_text

Swift Playgrounds

alt_text

This year, Swift playgrounds 4 allows you to work on your ideas wherever you go. It allows you to switch between Playgrounds and Xcode. Once you have created an app, you can even publish your app to TestFlight right from the Playgrounds app.

VR and AR Kits

alt_text

You can now add cool effects to your AR objects with Custom metal shaders and dynamic textures. You can see these effects in the Birthday Cake demo with confetti falling around the object.

Metal Improvements

alt_text

One thing that stood out to me as a Game Engineer is that you can now have more control over the display refresh rate. Especially if you are developing games that are going to run on the IPad Pro with ProMotion or on Macs that are connected to high end monitors, having control over the refresh rate can be useful for making your game look like it’s running smoothly!

Game controller support is also easier to add now, with haptic support. You can add a new on screen controller with only a few lines of code.

Notifications

alt_text

iOS is now changing how notifications work and at what level they are delivered. Focus allows the user to select what types of notifications are delivered. There are now 4 levels of notifications: Low, Active, Time Sensitive, and Urgent. Notifications summary allows users to get a brief overview of what was delivered with some marks of relevance.


There was lots more covered, but those are the highlights that stuck out to me. Let me know what you found interesting in the comments below!

Top comments (0)