How to Tackle Duplicate Test Doubles Problem in Modular Architecture

After SPM asset support has been added to Xcode 12, there is no reason not to use modularization in your iOS projects. It brings value no matter the project and team size. However, after some time, you might encounter problems like increased complexity, difficulty with integration testing, or code duplication. Today we’ll focus on the last one, specifically, testing doubles duplication. Let’s jump in! Introduction When saying “module” I’m always referring to a group of related targets....

March 30, 2023 · Bartosz Kunat

Kill It With Fire Review

“Kill It with Fire” exceeded my expectations. I initially anticipated a boots-on-the-ground review of technical debt handling. What I’ve got instead was almost everything but that. The book has changed the way I think about technical debt and how to communicate it upwards. It provides sound advice on various topics, including how to fight tech debt, schedule maintenance work, and communicate with stakeholders. I have not come across any other book that provides this much credible advice on the topic of technical debt without exclusively catering to a particular audience....

March 17, 2023 · Bartosz Kunat

How to Connect Internal Dependencies in Swift Package Manager

Swift Package Manager (SPM) is a powerful tool for modularizing your code and managing dependencies in your projects. If you’re working on a project that uses SPM for modularization, you may need to add internal dependencies to connect different parts of your codebase. In this article, we’ll go over how to add internal dependencies in SPM and configure your Package.swift file to properly connect them. Assumptions Before we get started, let’s make a few assumptions about your project and its structure:...

March 16, 2023 · Bartosz Kunat

Recover Corrupted Apfs Drive

How to Recover a Corrupted APFS Encrypted Drive As a Mac user, I have always felt secure knowing that my data is protected with APFS encryption. However, that sense of security was shattered when I was unable to mount a disk and Disk Utility reported it as corrupted. I couldn’t use Disk Utility’s First Aid as it failed to repair the disk. Here is the story of how I recovered a corrupted encrypted APFS drive....

March 2, 2023 · Bartosz Kunat

My Productivity Setup

Today, I wanted to give you a high-level look at what tools I use to organize my work and life and how I use them. The setup I’m about to show you is a product of 5 years of refinement. I still tweak some things, so there’s a high chance it will evolve further in the coming months. Before we start, I wanted to mention that I’m deep into the Apple ecosystem....

February 18, 2023 · Bartosz Kunat

Handling Edit Menus Without the First Responder

Context I’m currently developing a chat-based app that requires the implementation of coping messages. Essentially, when a user long-presses a message bubble, an edit menu will appear with the option to “Copy.” This feature is a common element across most chat applications. For the purpose of this article, let’s assume that all message bubbles are constructed using a subclass of UITextView called MessageTextView. To make the “Copy” option appear on a long-press gesture, we’ll first need to add the appropriate gesture recognizer:...

January 31, 2023 · Bartosz Kunat

Alfred Snippets on iOS

Alfred allows you to save your frequently used text clips as Snippets. Over the past few years I’ve created hundreds of them. There’s one problem. Alfred snippets only work on your Mac. Today we’ll focus on how we can convert them into macOS snippets. That way, you’ll be able to use them across all your Apple devices! How Alfred stores snippets as a Zip archive. On macOS, you can open it with the Archive Utility app that’s shipped with the system....

January 25, 2023 · Bartosz Kunat