Snapp Mobile iOS Newsletter

Issue 23 • January 17, 2025

Hello,

This week we’re looking at migrating from Original StoreKit to StoreKit 2, some tips and considerations when using lazy containers in SwiftUI, generating QR codes and creating lock screen widgets.

Enjoy the selection!

Swift

How to Call Multiple APIs Concurrently in Swift

A new week, a new article on concurrency - this time looking at the options that we have to trigger multiple simultaneous calls. The value for us, the readers, is in the informed look at pros and cons of each approach.

StoreKit

Why and How to Migrate Your App from StoreKit 1 to StoreKit 2

The Original StoreKit (the term that Apple uses) is deprecated but there are still a lot of apps that are using the API. It’s also confirmed that the original StoreKit will see no further enhancements. The StoreKit 2 API is simpler and modernized. Here’s an entry point on how to start migrating our app, in case we have not done it yet.

Receipt Validation in StoreKit 1 vs StoreKit 2: Exploring the New App Store Server API to Validate Receipts

Receipt validation is another StoreKit area that’s been given an overhaul in version 2. It requires you to communicate to a new server API and this article gives us the details on how to do that.

UI/UX

Tips and Considerations for Using Lazy Containers in SwiftUI

Lazy-loading and displaying content in SwiftUI is an extremely useful feature, but there are some less obvious pitfalls (hello .id()). This article guides us through some of the things to consider when we build UI with the lazy containers available in SwiftUI for us .

Create QR Codes with SwiftUI

There are cases where we need to transfer public data from one device to another. One of the patterns to do that is by using a QR code. This article guides us through generating and displaying a QR image from a String.

ContentUnavailableView

Starting with iOS 17 Apple made it easy to display placeholder views when there’s no content available. The link above leads to a graphical explanation on what the ContentUnavailableView looks like, and here’s the Apple documentation page with an example on how to use it for searching

Showing a SwiftUI sheet from a Mac Menu

Dealing with app menus on the Mac can be trick - as is in this case where the author wanted to trigger a SwiftUI sheet from a menu entry. The article links to another one giving us an idea on how to access the active document to perform the menu operation on, so hop in if you have a similar issue or if you are just curious.

Creating a Lock Screen widget with SwiftUI

Lock screen widgets are useful for displaying glanceable information from our apps that may lead to expanding the app usage. It’s also a way to make our apps “a good citizen”. Here’s how to get started.