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 Swift Concurrency
Learn everything you need to know to make optimal use of Swift Concurrency in your applications. This book covers everything from awaiting asynchronous method calls to building your own highly concurrent systems. It’s a great introduction for those looking to familiarize themselves with everything Swift Concurrency has to offer.
Buy on GumroadPractical 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 GumroadPractical 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 GumroadRecent articles
Jump to a random postTesting requirements with #require in Swift Testing
November 28, 2024In a previous post, I wrote about using the #expect macro to ensure that certain assertions you want to make about your code are true. We looked at testing boolean conditions as well as errors. In this post, I would like to take a look at a macro that goes hand-in-hand with #expect and that is the #require macro. The #require macro is used to ensure that certain conditions in your test are met, and to abort your test if...
Read more...Asserting state with #expect in Swift Testing
November 21, 2024I don't think I've ever heard of a testing library that doesn't have some mechanism to test assertions. An assertion in the context of testing is essentially an assumption that you have about your code that you want to ensure is correct. For example, if I were to write a function that's supposed to add one to any given number, then I would want to assert that if I put 10 into that function I get 11 out of it....
Read more...Improving test coverage with parameterized tests in Swift testing
October 31, 2024When you subscribe to the practice of test-driven development or just writing tests in general you'll typically find that you're going to be writing lots and lots of tests for pretty much everything in your codebase. This includes testing that varying inputs on the same function or on the same object result in expected behavior. For example, if you have a function that takes user input and you want to make sure that you validate that a user has not...
Read more...Swift Testing basics explained
October 23, 2024Swift testing is Apple's framework for running unit tests in a modern and more elegant way than it was with XCTest, which came before it. This post is the first one in a series of posts that will help you start using Swift Testing in your projects. In this post, we'll take a look at the following topics: Adding a Swift Testing to an existing project Writing your first Swift test Understanding Swift Testing syntax Let's go ahead and dive...
Read more...Testing completion handler APIs with Swift Testing
October 16, 2024The Swift testing framework is an incredibly useful tool that allows us to write more expressive tests with convenient and modern APIs. This is my first post about Swift Testing, and I’m mainly writing it because I wanted to write about something that I encountered not too long ago when I tried to use Swift testing on a code base where I had both async code as well as older completion handler based code. The async code was very easy...
Read more...What is dependency injection in Swift?
October 11, 2024Code has dependencies. It’s something that I consider universally true in one way or another. Sometimes these dependencies are third party dependencies while other times you’ll have objects that depend on other objects or functionality to function. Even when you write a function that should be called with a simple input like a number, that’s a dependency. We often don’t really consider the small things the be dependencies and this post will not focus on that at all. In an...
Read more...