Design+Code logo

Quick links

Suggested search

WWDC21

WWDC21, or the 2021 Apple Worldwide Developers Conference, is an event that reunites Apple developers from all over the world where new features, new operating systems, and other new opportunities are discussed. You can watch the Keynote session, which highlights all the new innovations that are coming to all Apple products.

Screen Shot 2021-06-15 at 2.02.38 PM (2)

Some of the main points that were announced are iOS 15 and MacOS Monterey. Both of these operating systems are still in beta, and will be available to all in fall 2021. Two other talks are important to watch if you're an Apple Developer: What's new in SwiftUI and What's new in Swift. Let's take a look at the highlights of each of these sessions.

What's new in SwiftUI

WWDC21 introduced SwiftUI 3.0: A new version of SwiftUI that incorporates many features that were missing in earlier versions of the language. AsyncImage, the refreshable modifier, the searchable modifier and an updated library of SFSymbols are only a few examples of what's new in SwiftUI. We'll be covering a lot of these topics in this course. You can watch the whole session about What's new in SwiftUI here.

SwiftUI is now a powerful language that can build apps as complex as the Weather app, which has been rebuilt entirely in SwiftUI. It's now the perfect to learn this language!

Screen Shot 2021-06-15 at 2.16.08 PM (2)

What's new in Swift 5.5

Swift 5.5 has tremendous performance improvements: Builds are faster when changing imported modules, startup time is shorter, and fewer recompilations make builds' performance improved by a lot. Memory management is also been improved, and it is automatically managed by Xcode - we, developers, don't even need to think about it!

Concurrency, as mentioned above, is the hot topic. We'll dive deeper into the subject in future sections, but basically, concurrency means when we want to run multiple code at the same time and/or suspend some code while we wait for data to be fetched or downloaded.

We work with concurrency by using async await functions. We'll see how we can incorporate them in our code in future sections. If you're eager to learn all about concurrency, you can watch the What's new in Swift WWDC21 session, watch other WWDC21 sessions about concurrency, or read the entire article about Concurrency in Swift's documentation.

Screen Shot 2021-06-15 at 2.43.49 PM (2)

What you'll build

To make the most out of all the new features that were introduced at WWDC21, we'll be creating an application that deals with asynchronous functions. The best way to learn about async and await is to make network calls. Therefore, we'll be building a portion of the home view in our Design+Code iOS application. You can even download our application from the App Store, and learn design and code on the go!

The home view is a view loaded with data. We'll learn how to make use of Contentful, a Content Management System, to host our data on the cloud. Using Apollo GraphQL, we'll fetch that data from Contentful, and process it in our application in order to display the data in beautiful cards. All of this network call will be done using async/await and continuation.

Screen Shot 2021-06-24 at 8.36.00 AM

We'll also learn how to implement new features that were added to SwiftUI 3.0: date formatter, pull down to refresh, swipe actions, search and AttributedString. Moreover, we'll make our app more accessible by enabling localization for our content, and adding labels and values to make our views more accessible for VoiceOver users.

This course will mostly focus on logic, backend and functions. We won't cover a lot of UI, so if you want to learn more about UI and animations, follow the new Build an app for iOS15 course or the Build an app with SwiftUI (Part 1, Part 2 and Part 3) course.

Requirements

This course was built with Xcode 13, iOS 15 and MacOS Monterey. It's important that you meet these requirements, as some newly introduced features are only available after iOS 15 and in Xcode 13. We also assume that you have some basic knowledge of SwiftUI and Swift. If you don't, I recommend you to follow the Build an App with SwiftUI Part 1, Part 2, Part 3, and SwiftUI Combine and Data to get a base of the concepts we'll cover in this course.

MacOS Monterey is still in beta as of this writing (June 2021). It's only available if you're under the Apple Developer Program (ADP), in the Downloads page and the Operating Systems tab.

Screen Shot 2021-06-15 at 1.10.23 PM

For now, Xcode 13 is also only available for Apple Developers under ADP, on the same Downloads page and under the Applications tab. This comes with built-in iOS 15 support, and the Simulators will run on iOS 15. Async await functions also only works on iOS 15 and later, so it's important for you to have Xcode 13.

Screen Shot 2021-06-25 at 9.36.10 AM

If you're not under the Apple Developer Program, MacOS Monterey is set to be released in fall of 2021. You can learn more about all the new exciting features that'll be available in MacOS Monterey on this page.

Screen Shot 2021-06-15 at 1.11.05 PM

Create your project

Open Xcode, and create a new project. This project will target iOS, so select App under the iOS tab.

Screen Shot 2021-06-15 at 3.08.48 PM

Give your project a name, and make sure that Interface is SwiftUI and Language is Swift.

Screen Shot 2021-06-15 at 3.10.57 PM

Once your project is created, click on your Project name. Under Targets > Deployment Info, make sure that you select iOS 15.0, since we want develop for iOS 15.0 and later. If you don't, you'll need to wrap your code with if #available(iOS 15.0, *) for all new features that we'll cover, which makes the code harder to read.

Screen Shot 2021-06-15 at 3.12.22 PM

Download Assets and Code

Make sure to download the source files of this course, as it contains assets and code that we'll need in the next sections.

  • In the Assets folder, you'll find the Illustrations folder. It contains illustrations that we'll need in the Setting up Contentful section (section 3). You'll also find the App Icons set - add it to your Xcode project's Assets folder.
  • In the Code folder, you'll find a few folders containing some files with code already written for you, for specific sections of this course. We'll get back to them later, you don't need to import them yet into your project.
  • The Completed Project folder contains the final Xcode project of this course.

Upcoming

Great! We now created our project and are ready to code! In the next section, we'll cover some of the basic elements of the home view - that is, the date title with the new formatted(date:time:) method that formats date automatically for us, tab view and card components using AsyncImage.

READ NEXT

AsyncImage and Date Format

Templates and source code

Download source files

Download the videos and assets to refer and learn offline without interuption.

check

Design template

check

Source code for all sections

check

Video files, ePub and subtitles

Videos

Assets

ePub

Subtitles

Test your knowledge of SwiftUI Concurrency. Complete the course and get perfect results for this test to get your certificate.