Digest: GitHub Universe, Apple Student Challenge, Swifty Stack

Article's main picture
  • #SwiftUI
  • #GitHub

• 3 min read

Welcome to our latest digest, where we discuss a new Swift Student Challenge, GitHub Universe presentation, and some programming tricks that every Cocoa engineer should know!

GitHub Universe 2023 Opening Keynote

Honestly, Apple’s "Scary Fast" event turned out to be quite boring. Watch the GitHub Universe presentation instead, where they announced that Copilot will be available on the web. Big news I know. Now you can generate descriptions for pull requests or ask for code explanations during reviews. GitHub Advanced Security also added new features to scan your code and suggest fixes for potential vulnerabilities.

In Copilot for VSCode, you'll now have slash commands:

  • The new command that creates a new project with all the necessary files
  • The tests command to generate tests for a specific part of your code. All of this should be available by December this year.

Swift Student Challenge

Apple announced the new Swift Student Challenge – a competition for students to create an app using Swift Playgrounds. Winners previously received a free ticket to WWDC, which costs over $1,600. Now, they get merchandise and a year-long developer subscription.

This is the best opportunity for students to get creative and earn global recognition. So I highly recommend participating! You can check out last year's entries through the link in the description.

Swifty Stack

Krzysztof Zabłocki, the creator of Sourcery, has announced his own iOS development course. It covers important topics like how to speed up development, prevent bugs, optimize workflow and testing. Prices start at $129.

Debugging SwiftUI views: What caused that change?

Ever had a SwiftUI view redraw and wondered why? With Xcode 15.1, there's a new private function that can easily get to the root problem. A static function called 'log changes' logs events when a new value is received in a State variable causing the view to redraw.

For example, if you have an animation and a timer in a view, you can now see the view redrawing when the animation plays and when the timer action happens.

Animating numeric text in SwiftUI with the Content Transition modifier

In SwiftUI, there's a contentTransition modifier that lets you animate text changes. Say you want to animate a number change in a more interesting way than just fade. You can use the numericText transition to get a cool animation like this. It's so neat, you might just want to add it to your own app.

Deliver reusable components without making them reusable

You can remove use-cases from the component's name, making it more universal. Take MoneyBuddyCard for example. Its name dictates where and how it's used. But if you rename it to AdviceView, it disconnects from the MoneyBuddy feature while still indicating its use – it can't be used for promos or warnings. If you completely detach the view from its usage, you get DecoratedCardView, which can be used anywhere.

Before you go and make all your components reusable, ask yourself two questions: Will it add complexity, and will it take a lot of time? If both answers are 'no,' then it's a good idea to make it reusable.

As always, you can learn more on these topics; all links are provided below.

Useful resources

More From engineering

Subscribe to our newsletter