Nil Coalescing Newsletter - August 2025

Hi there,

We are now on the final stretch before the public release of iOS 26 and the September Apple event has already been announced 🤩 I’m particularly excited about it this year because I’m planning to get a new phone. I still have the iPhone 12 and while it’s still working fine and even runs iOS 26, it doesn’t have Apple Intelligence and its camera is not quite up to scratch compared to the newer phones. I’m planning to take lots of nature photographs with my new device and I hope it will inspire me to build some cool new apps too.

Like many other iOS developers at this time, our team are working hard on polishing our apps and updating them for iOS 26. I’m also making good progress on a new app, which might be coming a little after the iOS 26 launch. I’ve been learning a lot during this time, and I wrote a few blog posts covering topics that were new to me this month. I’ve also been finding many great community resources such as blog posts, open source packages and developer tools that have been helping to move things forward.

In this newsletter issue I’d like to share my latest content together with some community resources I found most useful, and that could be relevant for your projects too.


Core Spotlight search

The new app I’m working on comes with a lot of content, so adding search functionality was high on my priority list. I also wanted to make sure users could find relevant content from the app when using device-wide Spotlight search on their phone, which meant that I had to look into Core Spotlight APIs. The nice thing about Core Spotlight is that the same search index we build to expose content to the system can also be used to power the search inside the app. I wrote a very detailed post on how this can be implemented, check it out if you are looking for ways to add search to your apps too - Core Spotlight integration for Spotlight and internal app search.

To query the Core Spotlight search index inside the app, we need to prepare it first by calling the prepare() class method on CSUserQuery. This only needs to be called once per app lifecycle and should be done only when necessary, for example, when the view with the search interface first appears. Depending on our app structure and hierarchy, it might not be as straightforward as it sounds. For example, if our search interface is placed in a separate search tab, we would need to prepare the index only when this tab is first opened, but the SwiftUI onAppear() method would be called every time the user navigates to the tab, not just once per app launch. To solve this issue in my project, I used a handy onFirstAppear() modifier described by Jordan Morgan in his blog post Running Code Only Once in SwiftUI. This technique can be used in other scenarios too when we need to run some code only once, not just with Core Spotlight.

Another useful technique for implementing search that I thought was very clever is using the Task.sleep() inside the task(id:priority:_:) modifier for debouncing search queries. The idea is to use the search text as the task id and sleep for a few milliseconds before starting a query inside the task. If the task is cancelled while sleeping because the search text changes, it throws an error and stops before running unnecessary, expensive queries while the user is still typing. Majid Jabrayilov explains this technique very well in his post - Yielding and debouncing in Swift Concurrency.


SF Symbol customizations

Many modern iOS apps rely heavily on SF Symbols in their interface, and my app is no exception. SwiftUI has some really nice APIs to get the most out of these symbols, letting us tweak them in different ways so they fit right into the UI. A while back I wrote a blog post that goes through all the customization options available - Customizing the appearance of symbol images in SwiftUI, and more recently I recorded a video SF Symbols in SwiftUI: Styling tricks you might have missed showing a few of my favorite techniques.

Still, no matter how many customization options there are, sometimes we just can’t find the exact symbol we need and have to create our own. This process can be a bit fiddly, especially when we already have some SVGs that we want to try out quickly and see if they are right for the app. Luckily, there are some great developer tools that can turn custom SVGs into SF Symbols with very little effort, for example, Create Custom Symbols, that I've used for my SVG to SF Symbol conversions.


Color conversions

For apps that have a lot of custom colors, it can be really helpful to have a good set of color utilities. I've been relying on the ColorToolbox package in mine, and it’s been pretty much indispensable. The package has a really simple API and and saves me from writing the same conversion code over and over. Going from a hex string to a SwiftUI Color, or back the other way, only takes a line of code. If your project involves a lot of custom theming or you often deal with brand colors, I think you’ll find this library really handy too.


Corner concentricity on iOS 26

Speaking of design, while preparing for iOS 26 I think it’s important to take a close look at the new ConcentricRectangle API in SwiftUI. Corner concentricity was a recurring theme throughout WWDC25, and it’s a big part of the new Liquid Glass design system where views are expected to align more precisely with their containers as well as with the device bezels. I wrote a blog post covering this API in detail – Corner concentricity in SwiftUI on iOS 26.


Discounts

Every month, I share exclusive, limited-time offers on my books with email newsletter subscribers. Sign up so you don’t miss future newsletter issues and can take advantage of upcoming discounts!


Subscribe so you don’t miss future issues!

Invalid email address

Unexpected server error

Subscribed!

We take your privacy seriously and will never share your details with third parties.

You can unsubscribe anytime using the link in our emails.

Newsletter RSS feed