It is not often when we need to wrap an async function with a completion handler. Typically, the reverse is what happens. This need can happen in codebases where the public interface can’t change just right now, but internally it is moving towards async-await functions. Let’s jump in and see how to wrap an async […]
SwiftData gained support for predicate expression in iOS 18. How does it compare to the expressions we can use with Core Data? Core Data Queries with NSExpression When Apple launched SwiftData with iOS 17 there were some gaps compared to Core Data. A big one for me was the ability to create an aggregate query […]
Throughout my life, I have met several people who struggle to learn a new language, with some of them being unable to communicate at a basic level despite having studied for several years. I believe that learning a language is not a matter of talent, but that of dedication and following a good process. In […]
#300: The Aftermath August 30th, 2024 · 29 minutes Fixing issues with the Overcast rewrite, dealing with negative feedback, and resolving mistakes. This episode of Under the Radar is sponsored by: Sentry: Mobile crash reporting and app monitoring. Get 6 months of the Team plan free with code radar. Stream this episode Source link
Apple added the Previewable macro to iOS 18. This generates the boilerplate wrapper view you need to preview a view with State bindings. What’s The Problem? I have mixed feelings about SwiftUI previews. When they work they can make creating a view an interactive experience. They can also be slow, break with confusing errors, and […]
I recently wrote a little toy app for my pickup soccer group to check field permit statuses. In New York City most public parks’ fields can be reserved or have recurring permits, so we have to check if fields are going to be in use before we try to organize games. The city parks website […]
Posted on Friday, August 23rd, 2024 at 7:15 am. PT Written by Jim Dalrymple I think this is the first time I actually made Dave yell on the podcast and it was hilarious. That comes as I give one of my final updates on my quest for a perfect cup of coffee. Has someone every […]
Xcode 16 added a property to asset catalogs to opt-out of asset symbol generation. This is especially useful for Swift Packages which had no way to disable the project settings they inherited. Asset Catalog Symbol Generation – A Recap Xcode 15 introduced a feature to create Swift, and Objective-C, symbols for colors and images in […]
Observation framework came out along with iOS 17 in 2023. Using this framework, we can make objects observable very easily. Please refer to @Observable macro in SwiftUI for quick recap if needed. It also has a function withObservationTracking(_:onChange:) what can be used for cases where we would want to manually get a callback when a tracked […]
The Entry macro reduces the boilerplate when customizing the SwiftUI environment. Creating New Environment Values – A Recap Adding our own values to the SwiftUI environment is a common operation but it requires some boilerplate code each time. See SwiftUI Custom Environment Values for an example but here’s a quick recap: Create the environment key […]