Hi, my name is Donny

I'm a curious, passionate iOS Developer from The Netherlands who loves learning and sharing knowledge.

Take a look at my books

Practical Combine

Practical Combine is a book aimed at intermediate to advanced developers who want to learn more about Apple's Combine framework. This book takes you all the way from the basics to building custom Combine publishers using Practical, useful examples that you can start using immediately.

Buy on Gumroad

Practical Core Data

Practical Core Data is for intermediate to advanced developers who want to learn more about Core Data. Whether you're new to Core Data, or tried using it years ago, you'll find that Practical Core Data introduces you to all the essentials to get you up and running with the framework.

Buy on Gumroad

Recent articles

What are primary associated types in Swift 5.7?

June 8, 2022

Protocols and associated types have always been somewhat of an interesting beast. They were hard to use sometimes, and before Swift 5.1 we would always have to resort to generics. Consider the following example: class MusicPlayer { func play(_ playlist: Collection) { /* ... */ } } This example wouldn’t compile, and it still wouldn’t today. The reason is that Collection has various associated types that must be clear if we want to use Collection. A common workaround is to...

Read more...

What’s the difference between any and some in Swift 5.7?

June 8, 2022

In Swift 5.1 Apple introduced the some keyword. This keyword was key in making SwiftUI work because the View protocol defines a Self requirement: protocol View { associatedtype Body: View @ViewBuilder @MainActor var body: Self.Body { get } } If you’d write var body: View instead of var body: some View you’d see the following compiler error in Swift 5.7: Use of protocol 'View' as a type must be written 'any View’ Or in older versions of Swift you’d see...

Read more...

Presenting a partially visible bottom sheet in SwiftUI on iOS 16

June 6, 2022

This post is up to date for Xcode 14.0 Beta 1 and iOS 16 Beta 1. It supersedes a version of this post that you can find here On iOS 15, Apple granted developers the ability to present partially visible bottom sheets using a component called UISheetPresentationController. Originally, we had to resort to using a UIHostingController to bring this component to SwiftUI. With iOS 16, we don't have to do this anymore. You can make use of the presentationDetents view...

Read more...

Formatting dates in Swift using Date.FormatStyle on iOS 15

May 27, 2022

Formatting dates in Swift using Date.FormatStyle on iOS 15 Working with dates isn’t easy. And showing them to your users in the correct locale hasn’t always been easy either. With iOS 15, Apple introduced a new way to convert Date objects from and to String. This new way comes in the form of the new Formatter api that replaces DateFormatter. As any seasoned iOS developer will tell you, DateFormatter objects are expensive to create, and therefor kind of tedious to...

Read more...

Closures in Swift explained

May 23, 2022

Closures are a powerful programming concept that enable many different programming patterns. However, for lots of beginning programmers, closures can be tricky to use and understand. This is especially true when closures are used in an asynchronous context. For example, when they’re used as completion handlers or if they’re passed around in an app so they can be called later. In this post, I will explain what closures are in Swift, how they work, and most importantly I will show...

Read more...

Debugging Network Traffic With Proxyman

May 12, 2022

Disclaimer: This post is not sponsored by Proxyman, nor am I affiliated with Proxyman in any way. I pay for my license myself, and this post is simply written as a guide to learning more about a tool that I find very important in the iOS Developer toolbox. Networking is an essential part of modern iOS applications. Most apps I’ve worked have some kind of networking component. Sometimes the networking layer involves user authentication, token refresh flows, and more. Other...

Read more...