March 3, 2020
Refactoring Wikipedia’s iOS App
This case study describes the refactoring of Wikipedia's WMFLocationManager class from Objective-C to Swift. The Wikipedia native iOS app project was launched in 2013. Almost 7 years and 30,000 commits later, the project consists of more than 180,000 lines of code in various languages. The ratio between Swift and Objective-C code is roughly 2:1.
January 21, 2020
Sending Test Push Notifications from Terminal
When working on a project recently, I needed an easy solution for testing and debugging push notifications. So I wrote a Swift command-line tool allowing me to send notifications directly from the terminal: lola. I’d like to share what I learned.
December 18, 2019
Clean Git History without Terminal
Your commits represent and encapsulate your added value to the project you’re working on. They are meant to forever live in the history of your repo. They are your legacy to all the programmers who will work on the project after you.
December 11, 2019
Testing Publishers Synchronously with a Blocking Recorder
When releasing Combine, Apple didn’t show us what their vision for testing the codebase with Combine was. Surely they must have thought about it.
December 2, 2019
iOS Code Review #2: Adding Tests to an Existing App (Networking)
Adding tests to an existing app can be challenging and sometimes intimidating. In this episode of iOS Code Review, I go through the process step-by-step.
November 28, 2019
Building a Custom XCTAssert for Multiline Strings
XCTest provides a bunch of XCTAssert... functions to be used for assertions in your tests. Sometimes, however, the functionality you need is different from what the built-in assertions can provide. Sometimes, all you really need is a custom XCTest assertion.
October 21, 2019
Why You Should Be Using `unowned` More Often
I’ve seen a lot of interesting codebases in the last two months: new clients of Industrial Binaries, submissions for my iOS Code Review series, and also code challenges of the candidates we’re recruiting.
September 12, 2019
Mocking Network Calls Using URLProtocol
For many apps, the networking code is one of the most important parts of the whole codebase. Yet it’s also a part which is quite difficult to test properly.
August 13, 2019
iOS Code Review #1: A Simple Weather App
I decided to try something new and recorded a YouTube video. This is the first video of the iOS Code Review series I’d like to do. In this series I’m going to review iOS projects which you can submit using this form.
July 22, 2019
Advanced testing using `Behavior` in Quick
Behavior
September 2, 2018
What’s inside the Derived Data folder?
Deleting derived data - a well know trick that comes in handy every time Xcode behaves strangely for no obvious reason. I still clearly remember when my senior told me about this basic iOS dev trick for the first time.