Sign in

… And many other things in Life!

The year is 2017. It’s a cold September morning in La Baule-Escoublac on the western coast of France. The sand beneath my feet is still wet from the early-morning rain showers. I’m nervous. I’m surrounded by 500 other people who are also wearing wetsuits. I selfishly hope that they are…

…Continued case study of how I approach unit testing of a CoreBluetooth layer in an iOS application.

In Part 1 of this case study, I covered the approach of applying architectural design principles to the layer of my code that was interacting directly with the CoreBluetooth layer, in order to make it fully testable. In this part I will continue where I left off and describe how…

A case study of how I approach unit testing of a CoreBluetooth layer in an iOS application.

When it comes to unit testing the part of your code that interacts directly with the Swift libraries, multiple challenges occur: Library objects are usually final with unavailable initializers. Additionally, Swift library delegate functions do not easily allow replacing the objects with mocked versions. These challenges can, however, be overcome…

You’ve reached the fifth and final part of the Unit Testing in Swift series!
In this article we will talk about behavioural asserting and look into further enhancing the mock classes, that we created in the previous article, to make behavioural assertion easy in your own test suite. If you are…

Welcome to the fourth part of the Unit Testing in Swift series!
In this article we will look into implementing custom mock classes to be in complete control of your code while unit testing. If you are new to unit testing and want to learn how to start unit testing with…

Welcome to the third part of the Unit Testing in Swift series, where we will cover how to improve your overall unit test quality with a good architecture throughout your project. If you are new to unit testing and want to learn how to start unit testing with Swift in…

In this second part of the Unit Testing in Swift series, we will cover how to properly test asynchronous code using expectations. If you are new to unit testing and want to learn how to start unit testing with Swift in Xcode, I suggest you take a step back to…

In this first part of the Unit Testing in Swift series, we will cover how to add a unit test target to your project and write your first unit test using the XCTest framework provided by Apple. If you, for whatever reason, missed the introduction to this series, you can…

Test, test, test!

As much as it may sound like a WHO recommendation in the middle of a COVID19 pandemic, it’s not. It’s the general recommendation for any software developer who values great code quality and peace of mind while developing. …

In a recent project I came across a problem that I am very sure many other developers face: Calculating the total distance between locations stored in a list. Imagine, for instance, that you have a custom route on a map represented by a list of CLLocation objects. How do you…

Kewin

Lead iOS Engineer @ Jabra 🇩🇰 Full time 💻📲 — part time 🚴🏽‍⛷🏃🏽‍🏊🏼‍

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