Refactoring Wikipedia’s iOS App
Mar 3, 2020, 3:43 AM
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...
Sending Test Push Notifications from Terminal
Jan 21, 2020, 3:00 AM
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...
Clean Git History without Terminal
Dec 18, 2019, 6:52 AM
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.
Testing Publishers Synchronously with a Blocking Recorder
Dec 11, 2019, 6:46 AM
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.
The post Testing Publishers Synchronously with a Blocking Recorder appeared first on...
iOS Code Review #2: Adding Tests to an Existing App (Networking)
Dec 2, 2019, 2:53 PM
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.
The post iOS Code Review #2: Adding Tests to an Existing App (Networking) appeared...
Building a Custom XCTAssert for Multiline Strings
Nov 28, 2019, 6:54 AM
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...
Why You Should Be Using `unowned` More Often
Oct 21, 2019, 3:14 PM
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.
The post Why You Should Be Using...
Mocking Network Calls Using URLProtocol
Sep 12, 2019, 4:04 PM
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.
The post Mocking Network Calls Using URLProtocol appeared first on Industrial...
iOS Code Review #1: A Simple Weather App
Aug 13, 2019, 4:09 PM
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.
The post iOS Code...
Advanced testing using `Behavior` in Quick
Jul 22, 2019, 4:11 PM
Behavior is a hidden gem in the Quick testing framework. It was introduced silently in 2017 and it’s not even mentioned in the documentation! The more I know about it the more I think this should be the way we write specs in Quick.