Have you ever needed to test something that throws a fatalError?

Here is a quick tip to help you do that.

The Problem

Let's suppose you want to test the code above. …

When implementing a form with MVVM in SwiftUI, we end up having to deal with a lot of boilerplate code for our bindings.

Personally, I've been adopting TCA for my personal projects and as my main approach to SwiftUI views, but at work, there are some flows that the team…

Mockar valores para um teste pode ser algo bastante lento e moroso. E às vezes acabamos produzindo um teste verboso e de baixa legibilidade, que é ainda mais difícil de entender por causa da quantidade de configurações necessárias para a criação dos objetos do cenário.

Para melhorar esse tipo de…

A generic approach to collect values when testing values in combine.


When testing something in Combine it's very common to end up having to collect values in order to validate scenarios like a state change, for example.
We could simply subscribe (i.e …


Mocking values for a test can be a very demanding and sluggish.
And sometimes we end up with a big test code with bad readability, that is even harder to understand because of the amount of setup needed for our mock objects.
To improve this kind of situations and avoid these…

Implementing Use Cases in Swift

What is a Use Case?

Source: https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html

By Uncle Bob's definition, a Use Case is basically an Interactor, which is responsible for encapsulating our Business Logic, and should have a well defined intention. …


It's very common to end up having to leave some change to your future self, when deadlines are tight and we end up creating technical debits. …

Save time automating part of your code reviews

What is Danger?

Danger is an automation tool, that runs on your CI and checks for pre-defined code conventions, like: linting, formatting, and so on.


This article does not intend to teach you how to integrate Danger in your CI, but rather present some possible…

Creating buttons is something we have to do very often…
What if you could simplify their configuration with a simple extension?

The Apple Way

To configure a button action we normally set it’s action from a selector and that’s it…

The Extension

A button have an action, which is defined as a selector.
A selector is, in a simplified explanation, just the name of some method that needs to conform to @objc and dispatches an action.

This way we can define an action as:

With that, we can create our extension.


With this extension, configuring a button action now becomes this:

Speed up your development process and create cleaner code.

This time we will present some extensions that can simplify and speed up your development process. The code presented here can be used by copying and pasting it to your project.

1. NSError

Every time I have to create a simple NSError instance with just a description. I end up having to…

Eduardo Sanches Bocato

iOS Engineer, AI enthusiast, Crossfit/Gymnastics. Currently working as iOS Lead @WarrenBrasil.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store