3 Mar 2022 · Software Engineering

    WWDC 2021: 8 Major Highlights for Apple Developers

    7 min read
    Contents

    With Memojis everywhere in the digital audience, WWDC 2021 has been a fantastic feast for the eyes. This is the second time Apple held the conference online due to the ongoing pandemic, but the company still managed to announce plenty of new features and improvements during the keynote. I anticipated a few, but some features left developers open-mouthed.

    Apple loves to feature apps with their latest creation(s). As an Apple Platforms developer, you can learn them to level-up your app game. So let’s go through 8 significant features to kick your app up a notch.

    1. Improvements to SwiftUI

    The most anticipated changes expected were in Apple’s two-year-old declarative framework. While the past years focused on moving to the new paradigm, this year’s release makes it more powerful. SwiftUI is taking another huge step forward.

    Apple has been dogfooding SwiftUI and adding critical APIs they needed in their apps. They’re using it in apps like Maps, Photos, and Shortcuts. Apple also rebuilt apps with SwiftUI like Weather and Apple Pay payment sheet. There’s also a new watchOS app called ‘Find My’ created using SwiftUI.

    Apple using SwiftUI in their own apps. Image Credits: Platforms State of the Union WWDC'21

    This release brings a lot to explore! For starters, pull to refresh is a one-liner and the search option is another line in List. You can also easily add custom swipeable actions on the rows. From material views for creating a blurry effect to loading remote images asynchronously to different types of button customization, you’ll have much to play with.

    There has been an appreciable focus on vital accessibility modifiers like Accessibility rotors and a new accessibility heading. If you’re creating custom components, for example, a Stepper, you can now inherit the accessibility implementation from the standard Stepper!

    There have been other improvements that you can check out over the dozens of SwiftUI sessions. You can start with What’s New in SwiftUI to uncover the latest updates. One session you must check out is Demystify SwiftUI as it helps you understand how SwiftUI actually works under the hood.

    New features in SwiftUI. Image Credits: Platforms State of the Union WWDC'21

    It’s exciting to see this excellent framework evolve to do the heavy lifting for you. Now you can focus on creating the best app experience for the users.

    2. Swift 5.5 and Concurrency

    Concurrency was the most requested feature in recent times for this open-source language. This year, Apple has finally added first-class concurrency support. It helps write code that takes advantage of the multicore processors on your devices by working in parallel.

    Earlier, you used completion handlers for the same motive. Unfortunately, that was a mess with a lot of complexity added. Now, this new feature makes it easier to write asynchronous code more neatly.

    It’s key to build responsive apps while doing asynchronous work in the background.

    Writing async/await code. Image Credits: Platforms State of the Union WWDC'21

    You add the async keyword in a function to make it asynchronous. Then, when you decide, prefix it with the await keyword to wait for the data in the background. Actors are the new technology that safely isolates parallel tasks from one another.

    To discover how the new syntax makes your code easier to read and understand, watch Meet async/await in Swift.

    3. Swift Playgrounds

    We used Swift playgrounds to prototype views on the iPad in the previous version. The problem was, you couldn’t build a fully-featured app. With the latest release you can make them on the iPad and submit them on the App Store directly from the Playgrounds app. 

    This means you can create and build the app on your iPad at the same time andit now features the same interactive preview available on Xcode and more support for SwiftUI.

    Uploading App on App Store Connect through Swift Playgrounds. Image Credits: Platforms State of the Union WWDC'21

    Swift Playgrounds 4 will be available later this year.

    4. Object Capture

    Apple announced RealityKit 2: a massive update that makes it easier to create exceptional AR apps. The highlight of this release is Object Capture. It helps to create high-quality, photo-realistic 3D models in minutes just from your phone’s camera. So creating 3D content is as easy as taking photos from your iPhone now.

    Multiple 2D photos converted into a 3D model using photogrammetry. Image Credits: Create 3D models with Object Capture WWDC'21

    With a few lines of code, you can generate your own 3D model that would take thousands of dollars and hours before this innovation.

    To learn more about creating lifelike 3D models, watch Create 3D models with Object Capture.

    5. SharePlay

    The past nearly two years have been challenging for everyone and people had to find new ways of connecting while working from home. Users in the Apple ecosystem rely on FaceTime and iMessage to stay connected.

    To make it convenient, Apple announced SharePlay to bring people together. It aims to create a real-life-like experience virtually. They also provided us with APIs to integrate the same experience for your app as well. APIs like the group activity framework bring people directly into your app.

    SharePlay framework. Image Credits: Platforms State of the Union WWDC'21

    For example, you’ve created a video streaming app in which you integrated the API. I want to stream the movie I’m watching with you over FaceTime. The framework does the heavy lifting to make sure the video streams on both devices simultaneously.

    When someone on the call doesn’t have your app, they get a notification to install your app. This helps you to bring in many more users.

    Watch Meet Group Activities and find out about the various shared experiences you can implement into your app.

    6. ShazamKit

    With Apple’s new framework, you can bring audio recognition to your app. This kit helps your user recognize a song and know its name, artist, genre, etc.

    In ShazamKit, you can use your own pre-recorded custom audio and make it recognizable.

    Features of ShazamKit. Image Credits: Explore ShazamKit WWDC'21

    The best part is that you can use this for Android as well! To know more about it, head to the session on Explore ShazamKit.

    7. MusicKit for Swift

    MusicKit lets your users play the entire catalogue provided by Apple Music and their local library. It can also create playlists and add songs.

    Before this WWDC, it was a pain to generate developer tokens to authenticate your app with Apple’s server. Apple seems to have heard our grievance and now it automatically associates it with your app’s bundle identifier. All you need to do is enable MusicKit App Service for your app.

    MusicKit designed with expressive API, with SwiftUI in mind. Image Credits: Meet MusicKit for Swift WWDC'21

    Apple also reworked this framework to create expressive APIs for music items.It leverages Swift’s new concurrency syntax and is designed better to use with SwiftUI. This accelerated integration makes it far easier to bring Apple Music to your app.

    Take some time to explore MusicKit updates on Meet MusicKit for Swift.

    8. Xcode Cloud

    Xcode Cloud is a new continuous integration and delivery service by Apple integrated into Xcode and hosted in the cloud. Like a CI/CD service, It helps to manage every stage in the development process.

    Xcode Cloud features. Image Credits: Platforms State of the Union WWDC'21

    It provides features for you to build, test, and co-design for distribution. It is currently available to developers as a free limited beta and the pricing and availability this fall. Availability is expected next year.

    Glow and Behold

    WWDC 2021 has given us a fantastic year to experiment with new tools, especially getting your hands on SwiftUI. We got substantial changes in the Swift programming language as well as numerous improvements in Xcode.

    I know it will be tough racing towards implementing every great feature out there in your app. However, you can automate some parts of your development process. It’ll help you develop great experiences by setting repetitive tasks on auto-pilot.

    You can use a top-rated CI/CD process for rapid development with industry-leading performance. Semaphore is available across various technology stacks in addition to Apple platforms. It helps you build, test, and deploy apps across teams without the high overhead costs.

    Feel free to reach out to the Semaphore team on Twitter if you have any questions!

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Avatar
    Writen by:
    Rudrank is an aspiring technical author and Apple platforms developer. You can mostly find him on Twitter (@rudrankriyam) or on his personal blog (rudrank.blog).