It’s been a week since WWDC 2019 – Apple’s Worldwide Developer Conference. That may sound like a long time, but it hasn’t been enough to fully grasp everything that was announced given that this was one of the densest and exciting WWDCs in years. A variety of new products were revealed, such as the new Mac Pro, but more importantly, for developers, a bevy of updates was announced for iOS and macOS.
We always stay up to date with iOS and macOS developments because they create opportunities to bring exciting new features and improvements to our existing apps. After a week of investigation, evaluation, and testing, we want to show you what we are most excited about, and why.
SwiftUI
We are most excited about SwiftUI – a new UI framework, written completely in Swift, that brings reactive programming to iOS. The past few years of UI development have seen rapid change, and this framework distills the major lessons learned during that time to provide a much more clean, simple, and understandable way to write UI code.
It has 3 important characteristics:
- Declarative: We define the code declaratively, as a function of our state.
- All code: No more storyboards and complicated file formats – the UI is just code.
- All Swift: There’s no under-the-hood magic, this framework uses and is written in Swift.
Why is it such a big deal?
- Less code: A variety of constructs have been simplified in SwiftUI. For example, writing a List in the past meant writing a lot of boilerplate; a complicated mess of delegates and data sources taking at least 50 lines of code. With SwiftUI, we can create a List with just 5 lines of code.
- More predictable code: SwiftUI is built upon the paradigms of reactive programming and declarative UIs, which bring with them the notions of dataflow and a single source of truth for our data. This means our apps’ states can be modeled and understood more easily, which results in easier development and fewer bugs.
- A unified framework for several devices: SwiftUI can be used to create apps for Apple TV, iPhone, macOS, Apple Watch, etc. Having a unified UI framework makes switching between platforms an easy task.
After trying it out, we can confidently say that SwiftUI is the future of iOS programming. Nevertheless, this beta release is still really buggy and incomplete, so it’s going to be a while until we can use it in production.
Sign in with Apple
Another significant announcement was the new Sign In With Apple service. It allows users to log in to third-party apps with their Apple account, just like Google or Facebook. Apple will work like any other authentication provider, using OAuth 2.0 to do this.
Biggest features:
- UI: Provides a nice button that says “Sign in with Apple.”
- OS Integration: On iOS devices, it’s completely integrated with the OS so you can use Face ID/Touch ID to authenticate. Similarly, on Mac Safari you can authenticate with Touch ID.
- Security: Apple provides a lot of security features with its login implementation.
- Data selection: The user can select which information they want to share with the third-party app they are logging into.
- Hide your email: If you don’t want to share your real email, Apple will create a fake one for you, that will act as a proxy and re-send all the emails to your real one. If you feel like deleting one of these fake emails, you can easily delete it.
One detail that should not be ignored is that Apple will make it mandatory to introduce this to apps that use third-party authentication services. There’s no timeline for this yet, but they stated that it will be required later this year.
iPad apps on macOS
The other big consumer-facing news to come out of the conference was project Catalyst. This is the codename for the project that allows iPad apps to be easily ported to macOS, and when I say easy, I mean “click a button” easy.
Catalyst was introduced as a demo last year but was otherwise kept under wraps. Now it’s out in the world, and new apps for iPad (iOS 13 and up) can be easily configured to run on macOS.
Why is this such a big deal?
-
- Unified codebase: In the past, developing an app for macOS and iOS meant having two different codebases. This almost always meant that teams maintained an iOS app and not a macOS app.
- Better user experience: Whenever a macOS app was needed, companies would rely on web technologies such as electron, providing inferior and inevitably inconsistent experiences compared to native applications.
Project Catalyst is going to significantly impact how developers create and maintain apps, and how their customers use them. There are already a few apps using it, including Jira, and we expect many more to follow.
New frameworks and improvements
Of course, since it’s a developer conference, there were new updates on Swift (Apple’s favorite language) and iOS in general. Some of the highlights were:
New Swift version:
Swift 5.1 was announced, with new features that make developing apps in Swift a breeze. One of them is ABI stability, which means that, in the future, apps compiled in different versions of the language (5.1 and 6 for example) will be able to communicate. No more pain updating the dependencies!
Combine – a new reactive framework:
A new framework called Combine was introduced. Many new frameworks and libraries rely upon the reactive programming paradigm, and Apple’s new framework is no different. At Moove It we’ve been using reactive programming for a while, not only by using React and React Native, but also using RxSwift in our iOS apps. We’re happy that we chose wisely!
For experienced RxSwift users, you’ll find Combine familiar. The transition for us is going to be a quick one 🙂
Summary
This was one of the densest and exciting WWDCs in years. We have only just begun to unpack everything that was announced, and are already excited. The Apple ecosystem is evolving for the better, which will enable us to build more elegant, feature-rich applications. We can’t wait to see what next year brings!