The Derived Data folder is one of the most important directories an iOS developer relies on. While you don’t work with it directly, Xcode is using it heavily to cache information and optimize the developer experience. Yet, there are many opportunities for iOS engineers to maximize the benefits of Derived Data. Whether it’s deleting files …
App Store Optimization: Real-world Best Practices
App Store Optimization is important for every app’s success. You’ve spent a lot of time building a fantastic product, so you’d better get it in front of as many potential users as possible. Yet, it’s a whole different paradigm; it requires different knowledge and tools. I’ve been here myself, and today, I’m sharing my personal …
Introducing Diagnostics: Improved Debugging and User Support
A diagnostics report that helps you solve bugs and improve user support at the same time. I’ve been writing apps since 2009, and the Diagnostics repository is an outcome of all that experience. Used by major apps from companies like WeTransfer, it has proven it’s value time after time. I’ve seen consistent inefficiency at many …
SwiftUI Toggle: A Complete Guide
A SwiftUI Toggle is a common UI element that allows users to switch between states. It often turns a binding value on or off, and it’s commonly used for settings or binary choices. In this guide, I’ll walk through everything you need to know about a Toggle in SwiftUI: from the basics to customization, accessibility, and real-world …
@ViewBuilder usage explained with code examples
The @ViewBuilder attribute is one of the few result builders available for you to use in SwiftUI. You typically use it to create child views for a specific SwiftUI view in a readable way without having to use any return keywords. I encourage you to read my article Result builders in Swift explained with code …
Swift Computed Property: Code Examples
Computed properties are part of a family of property types in Swift. Stored properties are the most common, saving and returning a stored value, whereas computed ones are a bit different. A computed property, it’s all in the name, computes its property upon request. It can be a valuable addition to any type to add …
Property Wrappers in Swift explained with code examples
Property Wrappers in Swift enable you to extract common logic into a separate wrapper object. Introduced at WWDC 2019 and available since Swift 5, this feature is a useful addition to the Swift library that helps eliminate much of the boilerplate code we often write in our projects. You can find a background story on …
Async await in Swift explained with code examples
Async await is part of the new structured concurrency changes that arrived in Swift 5.5 during WWDC 2021. Concurrency in Swift means allowing multiple pieces of code to run at the same time. This is a very simplified description, but it should give you an idea already of how important concurrency in Swift is for …
Global actor in Swift Concurrency explained with code examples
Swift Concurrency introduced the concept of a global actor among async/await and tasks. The most common one is likely @MainActor, which I already explained in depth. However, you can also create custom global actors. Although they have existed for a few years, it remains unclear for many developers when and how to use them. Should …
Combine and Swift Concurrency: A threading risk
Many developers are migrating from Combine to Swift Concurrency. Swift Concurrency is here to stay, and Combine hasn’t received updates in recent years. While Combine is a mature framework that may not need many updates, it’s clear that the Swift team is focusing on a future with Swift Concurrency. When migrating Combine code to Swift …