ylliX - Online Advertising Network

SwiftData Expressions

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 […]

My process for learning new languages

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 […]

SwiftUI Previewable Macro

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 […]

Disabling Xcode Asset Symbol Generation

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 […]

Cancellable withObservationTracking in Swift

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 […]

Entry Macro for Custom SwiftUI Environment Values

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 […]