Digest: Advent of Code, Observable Architecture, Xcode Cloud

Article's main picture
  • #SwiftUI
  • #Xcode

• 3 min read

Welcome back to our regular digest where I bring the most exciting updates and insights from the world of iOS and macOS development. In today’s spotlight: Observable architecture, Xcode Cloud, more ChatGPT use cases, and the Advent of Code.

Introducing Observable architecture

Goodbye Composable architecture! Hello, Observable architecture!

It's essentially a somewhat simplified version of Composable architecture, built on the new Observation framework. And although this framework is available only from iOS 17, guys from Point-Free have achieved full backward compatibility. To make everything work on iOS 16, you need to wrap the view using WithPerceptionTracking, which does all the magic for you.

See all the API changes in the article.

Free Xcode Cloud

Apple now includes 25 free hours of Xcode Cloud usage each month with the Apple Developer Program. Initially, this offer was supposed to expire at the end of the year. However, they've recently extended the offer indefinitely. It's possible that, like me, you might have overlooked this service amidst your busy schedule.

Learn more here.

Customize macOS menu bar in SwiftUI

The arrival of SwiftUI has unlocked a unique opportunity – customize the menu bar for macOS apps. Forget about XIBs and Storyboards, and all other workarounds. Now, with just a few lines of code, you can create your menu bar and maintain standard buttons. For example, you can add a full menu of your own or add a separate item after the undo-redo section.

For more details, check out the full guide.

ChatGPT for software engineering

The ChatGPT-mania is slowly calming down, and now a lot of people have figured out how to use AI for their needs. With this in mind, I'd like to share three practical applications of how I use ChatGPT in software engineering.

Discovering the unknown. When you want to find something, but don’t know what to look for. For example, you might be wondering how the start function works in Swift. Googling it will give you some information, but it’ll be either too abstract or off-topic. ChatGPT is ideal for these types of problems.

Very specific tasks. Sometimes you need to solve a specific task, like implementing logic in a certain framework. A regular search will not help. But ChatGPT will give you a solid answer.

Quick answers. With ChatGPT, you can get a quick answer, especially if you need something specific.

Advent of Code

During the holiday season, developers have their own Advent calendar. It’s called Advent of Code – an annual set of programming challenges to be solved till Christmas.

This year, the Swift team has even prepared the board of honor for the star participants. In case you missed the Advent of Code, no worries, you can always go back and try your luck.

Jump on the adventure here.

More From engineering

Subscribe to our newsletter