With the new devices comes a macOS update, this time called Monterey. In the last update, we mentioned the new Xcode 13. Well, we now have Xcode 13.1 — and, more importantly, Xcode 13.2 Beta, which now includes backwards compatibility for Swift Concurrency (async/await, etc.).
The keynote wasn’t just about MacBooks though. Refreshed AirPods were released and you can now get a HomePod Mini that will suit your interior even better.
We could fill the entirety of our Swiftly Highlights just with details about the things above, but we of course have more interesting highlights for you.
Navigation in SwiftUI doesn’t seem to be the most flexible thing, but we have to work with what Apple provides. John Sundell wrote a great overview about how to programmatically navigate with NavigationLinks.
NavigationView supports quite a lot of customizations, but the implementation seems to be a little tricky. Luckily, there is a great article about how exactly you can achieve multiple different NavigationView looks. The article also mentions the navigation bar changes in iOS 15 SDK which you might have encountered. Those changes apply to UIKit as well, and you might need to implement UINavigationBarAppearance to get the previous look (if you are building with the newest Xcode 13).
The article above also mentions Materials, a new thing in iOS 15 that you can now use in SwiftUI 3.
Not all apps require sophisticated architecture and custom build systems, but it’s interesting to learn about some of the problems that big apps are solving. For instance, Airbnb is using Buck as their primary build system.
It’s good practice to separate your app into smaller modules, which enables easier cooperation between developers. But Lyft took their refactoring to a whole new level. They started with a 5,000-line switch statement and now have around 2,000 separated modules in total — they even wrote their own DeclarativeUI, which uses their design system.
Guides & Tutorials
If you are just starting with Swift, there is a great new article to get you up to speed. Once you are finished with that, you might want to learn about Git and how to make your PRs smaller and more productive. Eventually, you will definitely need to debug the network communication. You can use applications like Charles or Proxyman, but there is now a built-in network inspector in Xcode 13.
One More Thing
WWDC isn’t coming anytime soon, but you can still learn something new from Apple experts during November and December. There is a new Apple initiative called Tech Talks, for which you can register now. You’ll be able to learn more about multiple different topics, and can also ask for answers to your problems or to curious questions during 1on1s.