Product changes announced by Apple at WWDC earlier this month will have long lasting repercussions for the Apple developer community. While there, we learned a lot of new things that have us excited. Here are the highlights.
SwiftUI
SwiftUI is a radical new approach to building user interfaces on Apple’s platforms. During its introduction, Apple likened it to using a professional chef to prepare your food rather than procuring the ingredients and cooking it yourself. At the simplest level, instead of developers building every element of an app’s UI themselves, including navigation and animations, using SwiftUI they can tell the system what elements they want on screen and what behaviors they want from those elements. The underlying system figures out how to best build, lay out, and animate the views onto screen.
In addition to the declarative building of UI that SwiftUI brings, it also adds new methods to manage data within an application. These new methods, called bindings, allow the UI to react to changes in the application’s state rather than having to be told that a change has happened. This even includes system settings, like whether the device is in light or dark mode, what accessibility modifiers are active, what the user’s preferred text size is, and more. Along with the device’s settings, developers will now have an easier time reacting to user input and background tasks like network requests.
Finally, SwiftUI provides a unified UI framework for all of Apple’s platforms. With a little bit of customization, apps built using SwiftUI can become beautiful native apps on all Apple platforms, from Apple Watch to macOS. This will unlock a new generation of connected apps that a user can buy once and use across all of their devices.
Combine
In addition to SwiftUI, Apple has introduced a new framework for reactive data streams called Combine. This framework is similar to the ReactiveX frameworks like RxSwift and implements most of the Reactive Streams standard, but is optimized for Apple’s platforms. Alongside SwiftUI, this framework enables developers to more easily observe and transform data as it flows through the app, whether from user input or long-running network requests. Although foundational, Combine can have a significant impact on ease of implementation as well as the subsequent reliability and performance of certain features within an app. Now that it ships with the new operating systems, projects no longer need the overhead of rather large reactive frameworks, making apps smaller and easier to maintain.
Dark Mode
Introduced in macOS 10.14 last year, dark mode is a new system UI style supported by iOS 13 (including tvOS 13 and iPadOS 13). A dark mode application will use black (or near black) backgrounds with light color text, as well as different colors, to offer a less blinding version of an app’s UI to the user. User’s can switch between modes at any time, so apps will need to be able to adapt to the color changes as the user updates their preferences. Additionally, devices can be set to automatically switch between light and dark mode depending on the time of day, meaning apps will need to adapt as they’re being used. Naturally this means that application colors and assets will need to be updated, as well as adopting various system features to enable the dark mode UI. Since this is a very visible feature, applications that don’t support dark mode will stick out like a sore thumb and become the focus of user complaints.
iPadOS and Adaptive UI
For the release of iOS 13, Apple has decided to brand the version of iOS that runs on iPads as iPadOS in order to draw further distinction to the platform. Although iOS and iPadOS are essentially identical now, this change sets the stage for future separation and new iPad capabilities.
In addition to this nomenclature change, iPadOS 13 (and iOS 13) brings new changes to the multitasking and windowing capabilities of iPads. Users can now use the same app in multiple windows as well as slide over and split view. This means that apps need to fully support the adaptive layout APIs that Apple has shipped for the last few years. Additionally, apps wishing to support the multi-window mode will need to be updated for the new APIs. Finally, Apple will start requiring all new applications to support the iPad’s various screen sizes natively in April 2020, and updates to existing applications will be required to do the same sometime after that.
Catalyst (iOS / iPadOS apps on macOS)
In addition to new capabilities for iPads, Apple has also enabled the building of previously iPad-only apps for macOS, meaning companies with iOS apps but no macOS app are only a few steps away from shipping on a whole new platform. Apple has done the hard work of mapping nearly all of the iOS-specific APIs to macOS equivalents, so properly designed iPad apps should be able to port over rather quickly. While not all apps might be useful on macOS, this enables apps on iOS with no macOS counterpart to rapidly become available on a new platform.
What should you do?
Developers:
- Experiment with SwiftUI and Combine and report as many bugs as possible. This will both help you increase your expertise with the new technology and also give Apple the feedback they need to make both frameworks as great as possible before they ship them.
- In addition to experimentation, building full apps to validate use cases would be of great value. At this point, the idea of faster, more reliable app builds is purely theoretical. It would be great to prove these technologies out as soon as possible so that everyone can benefit..
- See what it would take to switch most of your project dependencies to Swift Package Manager now that it has its first integration into Xcode. Some dependencies won’t be able to be moved, as SPM doesn’t yet support resources, but modern Swift dependencies should be able to move over pretty easily.
Designers:
- Dark mode is the name of the game. Every app will need to be updated. Apple has made a variety of guides and WWDC session videos available that talk about dark mode best practices and how to adapt color and assets for the new scheme. Any app that doesn’t support dark mode will start getting complaints soon after the release of iOS 13.
- Sit with developers to build an understanding of the capabilities of SwiftUI’s components. They work differently than what we’re used to and may have different capabilities. We need to understand how this will affect building UIs at a design level. It’s a radically different approach to building iOS apps, so it’s important to get devs and designers on the same page regarding its capabilities and best practices.
- iOS now includes a variety (1500+) of system symbols to use in apps. These are vector images that can be scaled with font size and easily set relative to other text. They’re also optimized for both light and dark appearance, and so can be used as a quick start towards supporting dark mode. There are also methods to fall back to static images as these symbols only exist on the latest OSes. Apple has an app that can be used to preview the symbols available on their design site.
QA:
- There are a variety of new accessibility features on iOS 13, including a full voice control API. This can provide a new approach to testing the accessibility of apps, as voice control uses the same labels that Voice Over does to enable access to different UI elements. t’s important that you get an iOS 13 device up and running to validate support for your apps.
SwiftUI makes supporting localization and accessibility much easier than before. Sit with a developer and explore these capabilities. Additionally, there are a variety of videos on new accessibility features, so watch them to get a broad overview of all of the new features.
If you’re looking to get connected to other developers, join our developer community, CoLabs.