iOS Newsletter
Happy New Year!
We hope you had pleasant holidays and found some nice things under the tree. :)
It’s the beginning of 2025, so let’s aim to make it better than the last one.
Enjoy this week’s articles!
Swift
Swift Synchronization Mechanisms
Here’s a useful reference on the existing synchronization mechanisms in Swift. Related to it is the link at the bottom of the newsletter that points to the correct repository for the Swift Atomics
package.
Fetching OSLog Messages in Swift
Another great article from Keith Harrison — this time on how to fetch the OSLog
messages from your app in your app. Useful for these debug screens that we all have.
Actor Reentrancy in Swift Explained
One of the trickiest parts of writing code with the new Concurrency
framework is actor reentrancy. Donny Wals has written a nice entry that illustrates the problem and comes up with a solution for the particular case where it occurs. It’s a problem that we have stumbled upon with our own projects, and we sorted it in a similar fashion.
UI/UX
Deep Linking for Local Notifications in SwiftUI
This article by Majid Jabrayilov offers a simplified approach to deep linking that may be useful for projects where keeping the app flow context is not necessary. The benefit of using it is its simplicity, as deep linking can be a source of problems that are hard to track.
How to Keep Your macOS App’s Menu Bar Item Running After Quitting the App
Now, this is something that we enjoyed discovering recently. macOS is a platform that shares a lot of similarities with iOS, but dealing with app termination is among the places where it differs. This article digs into how you can leverage the termination callbacks to switch from a full-fledged app to a status bar item when quitting — something we think can be quite useful for many utility apps.
Removing Items from SwiftUI Lists in Mac Apps
Speaking of differences between macOS and iOS, here’s another one — removing an item from a list in SwiftUI
. Dealing with list items requires a bit more work on macOS, so make sure to check out this article to get a better understanding of why and how.
Implement Blurring When Multitasking in SwiftUI
Some of your app screens may contain sensitive user information—think of banking and messaging apps, for example. iOS takes a snapshot of your app when it goes to the background and uses that snapshot in the app switcher. This article shows you how to intercept the process and blur your app content before the snapshotting happens, so that you don’t show sensitive data in the app switcher.
Repository
Swift Atomics
As the first article in this week’s selection has wrongly linked the Atomics
package—here it is. The package offers an atomic library for Swift, providing atomic operations on various Swift types. As this is a standalone package, separate from the core Swift project, it can be used with older versions of Swift (support goes down to Swift 5.3). For Swift 6 / iOS 18 and above, it is recommended to use the Atomic
implementation available in the Synchronization
framework.