Snapp Mobile iOS Newsletter

Issue 19 • December 6, 2024

Hi again, folks!

We hope you struck some cool Cyber Monday deals. Starting with this issue of the newsletter, we’re going to link the author profiles on BlueSky (where possible). We know you understand the reason.

You may as well find a directory with the profiles of some of our colleagues and friends on BlueSky at this link.

Enjoy this week’s mixture!

Swift

Lazy vars in @Observable classes in Swift

@Observable is the new hype, but adopting it comes with some interesting challenges. If you ever had to convert a class that has a lazy property, you may want to take a look at Natalia Panferova’s discovery.

MainActor usage in Swift explained to dispatch to the main thread

We’ve been sharing articles related to the new Concurrency framework for quite some time. This one has a lot of information on the usage of @MainActor and actors in general, but it also contains a gotcha related to using methods annotated with @MainActor from a synchronous nonisolated context - a thing that may produce unwanted results for people who don’t have the Swift 6 compiler mode enabled.

UI/UX

On Apple’s Guidance for StateObject Initialization

SwiftUI relies on a few specialized property wrappers for managing the state in its views. Among the newer additions is a thing called @StateObject. This article takes a detailed look at how we can consider it a private state within the view scope and why this property wrapper is so useful.

Scenes types in a SwiftUI Mac app

Making applications for macOS is both familiar and different for iOS developers. Understanding the various supported scene types is key to creating a product that fits in. This article looks into the different types of scenes and uncovers their distinct behaviors and capabilities.

Prevent screenshot capture of sensitive SwiftUI views

Security has many forms and taking it into account always pays off. This article looks into implementing a feature that prevents sensitive content from being captured in screenshots and screen recordings with SwiftUI - a feature many apps can benefit from.

Creating view transitions in SwiftUI

When done right, animations can enhance the user experience of an app. One of the most common places to apply animation is when things appear/disappear/change on-screen. SwiftUI has a great set of tools that are accessible through the transition view modifier for this, and this article walks you through how to use them.

Repository

SwiftUI-experiments

We have recently stumbled upon this useful repository where Michael Lee has shared some quite interesting UI/UX explorations. It’s a lot to digest and learn from, so we hope you are as excited about it as we are.

Talk

Xogot: Godot on iPad Preview

Miguel De Icaza announced that you can now get the first beta of Xogot on TestFlight. Xogot is a project to bring Godot on iPad, and the talk is a fascinating story of bringing it to life. Along with it, there’s a repo with Swift bindings for Godot, so you may give it a try if it scratches an itch.