Snapp Mobile iOS Newsletter

Issue 7 • September 13, 2024

Swift

Mastering Generics in Swift: From Basics to Advanced Techniques

Generics are one of the most powerful features of Swift, and much of the Swift standard library is built with generic code. Understanding the topic is the key to elevate your command of the Swift programming language as it enables you to write flexible, reusable functions and types that can work with any type, subject to requirements that you define.

Using Custom Components in Swift’s Regex

Did you know that you can create your own custom parsers through the CustomConsumingRegexComponent protocol? This article explains how and comes with an example of creating a custom phone number component.

Sendable and @Sendable closures explained with code examples

Sendable and @Sendable are part of the concurrency changes that arrived in Swift 5.5 and address a challenging problem of type-checking values passed between structured concurrency constructs and actor messages. In this article Antoine van der Lee takes a look at both, explains how to use them and what is the difference between the protocol and the closure annotation.

Swift for WebAssembly

In this talk from SwiftCraft 2024, Steven Van Impe takes us on a fascinating journey on discovering how to use Swift in our web apps. It’s quite exciting to see Swift being used beyond the boudaries of Apple’s ecosystem.

AppStore

Win-back offers for auto-renewable subscriptions now available

You can now configure win-back offers — a new type of offer for auto-renewable subscriptions — in App Store Connect. Win-back offers allow you to reach previous subscribers and encourage them to resubscribe to your app or game.

UI

Introduction to supporting VoiceOver in SwiftUI

Making an app accessible is crucial for ensuring that all users, including those with disabilities, can enjoy a seamless experience. For instance, users who rely on assistive technologies like VoiceOver should be able to interact with our apps without needing to see the screen. Natascha Fadeeva discovers.

Bad practice creating a StateObject

SwiftUI is awesome but with the great power comes great responsibility. Understanding how its building blocks work together is the key to avoid many nasty bugs like the one that Vincent Pradeilles looks into in this article

Persistence

SwiftData Expressions

With the introduction of iOS 18 and Xcode 16 entering the Release Candidate phase this week it’s time to look at the new powers that SwiftData had gained. This article also compares them to the expressions we can use with Core Data.