A lot happened in 2022. The war in Ukraine and the movement of refugees, saying goodbye to the Queen of England and her son Charles becoming the King… these examples are only a fraction of the events that have influenced the world. Some consequences of these events were inflation and an increase in the prices of food, fuel and resources.
But despite everything, Apple is still moving forward, and 2022 brought many changes that will define how we create products in the future.
Hardware
It's been more than two years since Apple introduced the Apple Silicon M1 in the first MacBooks. Since then, more and more powerful versions have been introduced to the M1 family. Xcode Build Benchmarks were insane with the M1 Max and we can't wait for the new build of the M2 family. So far, the standard M2 has been introduced and its performance crushes the standard M1 chip.
In addition to chips, the Apple Watch Ultra for athletes with a battery life of up to 36 hours, and the new Airpods Pro 2 with a new generation of active noise cancellation + 30 hours of total listening time were presented. Last but not least, the new iPhone Pro comes with Dynamic Island, which comes with many ways to play with it. If you’re interested, you can check out some inspiration on how to master Dynamic Island in SwiftUI.
SwiftUI
SwiftUI for iOS 16 was released in 2022 and it’s packed with a lot of new features. Apple is obviously pushing it to the forefront and wants it to become a standard for creating UI. With the latest changes in navigation — where NavigationView is replaced by NavigationStack — we can finally stop using UIKit navigation and Coordinator pattern.
Not to mention, compatibility between UIKit and SwiftUI is increasing more and more. With new UIHostingConfiguration, we can easily start refactoring or adding new UI to old screens written in UIKit. These kinds of changes allow us to easily switch from old XIB files or Storyboard to SwiftUI.
If you are a newcomer to the SwiftUI world, don’t hesitate to jump on these resources, which might help you learn something new:
- Introducing - SwiftUI cheatsheet
- SwiftUI by Example: Now updated for iOS 16
- Sheets in SwiftUI explained with code examples
Swift
The long-awaited Swift 5.7 was released in September! This was a gigantic collection of changes, with improvements including shorter and easier syntax for unwrapping optionals. Writing shorter guard and if statements can improve readability and make code cleaner.
Changes continued through new features such as regular expressions. Despite many developers hating Regex, it’s a powerful tool — and improvements in Swift will help limit using Formatters too much.
Last but not least, it’s worth mentioning the new capabilities around protocol and generics that allow us to be much more intentional about how we use protocols in our code. This is achievable through the keywords any and some. With this combination, you can improve your APIs and unlock exciting ways to write generic code in Swift.
You can find an outline of even more changes in Paul Hudson’s article, which includes an Xcode playground download.
Swift is still evolving and more new features are sure to come. There’s a plan for Swift 5.8 and updates to the Foundation framework. We’re looking forward to what the future will bring.
iOS 16
With the introduction of iOS 16 also come new features, such as a new Lock Screen and Home App, plus improvements across the whole system.
For developers, WWDC and the new iOS means that we can improve the user experience and introduce new features into our applications. Apple both introduced new APIs and changed some existing ones to support new iOS features. Let's check out some of worth mentioning:
- ActivityKit - Displaying live data with Live Activities, which is a new type of notifications for Dynamic Island.
- WidgetKit - Widgets are popular in iOS, so Apple introduced them on iPhone in the new Lock Screen and on Apple Watch as a complication. We can now add glanceable content and let people quickly access our application for more details.
- WeatherKit - You guessed it — Apple is now offering a wide range of data about weather and we don’t have to use third-party data anymore.
What’s More
For over a decade, the App Store editorial team has taken a moment at the end of every year to celebrate the very best apps and games, and 2022 was no exception as they announced the winners of the App Store Awards. Speaking of — the summer’s Apple Design Awards included the Social Impact award, which was given to an application STRV developed: Rebel Girls.
While Xcode 13 added some major features — such as version control, DocC and Xcode Cloud — Xcode 14 opts to return to the basics and polish some core features that make the whole experience faster and smarter to use. They even managed to downscale the size of Xcode by almost 3 GB between major versions.
And that’s a wrap on 2022. Here’s to the new year. Have a great 2023!
Would you like to join the STRV team? We're hiring!