Xcode 9.4.1 cannot run unit tests for Frameworks on macOS Mojave

Are we still using Open Radar? Been a while since I’ve filed a bug report with Apple, but this one was too bad to let go. Xcode 9.4.1 will not run unit tests for Cocoa Touch frameworks on macOS Mojave. If you haven’t upgraded to Mojave yet and you’re working on any Cocoa Touch frameworks projects, you might want to …

WWDC 2018 What’s New in Testing Recap

In Apple’s WWDC 2018 talk on What’s New in Testing, they announced a big new feature: parallel testing. Parallel testing runs your test suite on multiple simulators at once, in parallel, so it takes significantly less time to run. And all you have to do is check a box in Xcode 10. If you don’t already have tests, you can …

WWDC 2018 What’s New in Swift Recap

In What’s New in Swift at WWDC 2018, Apple gave a quick overview of what’s new in Swift 4.2 and Swift 5. You can read my notes below, or you can watch the 40-minute video and download the slides from Apple. Community updates Swift 4.2: Faster builds Language features to improve efficiency SDK improvements for Swift Converging towards binary compatibility …

WWDC 2018 What’s new in Cocoa Touch Recap

In What’s new in Cocoa Touch at WWDC 2018, Apple gave an overview of framework updates (largely focused on performance), API enhancements, and Siri shortcuts. You can read my notes from the talk below, and you can watch the video and download the slides from Apple’s WWDC 2018 page. Overview Framework updates API enhancements Siri shortcuts Performance updates Scrolling Memory …

WWDC 2018 Platforms State of the Union Recap

In the Platforms State of the Union at WWDC 2018, Apple discussed new and updated tools and frameworks for developers. You can read my notes from the talk below, or you can watch the video in the unofficial WWDC app for macOS or in the official WWDC app for iOS. Privacy Trust is crucial as technology becomes more and more …

WWDC 2018 Keynote Recap

In today’s WWDC 2018 Keynote, Apple talked about new features and updates for iOS 12, watchOS 5, Apple TV, and macOS Mojave. If you missed the talk, you can get a quick overview with the rough cut of my notes below. You can also watch the 2+ hour talk or read Apple’s marketing pages for iOS 12, macOS Mojave, watchOS …

When to unit test private methods

Last week, we talked about why you shouldn’t unit test private methods. Today we’ll talk about why you should. Wait, what? I just told you that unit testing private methods was unnecessary because you can just test the public methods that call them. However, I was making a big assumption when I said that. I was assuming your public methods …

Can I unit test private methods?

I’ve heard a variation of this question over and over: “Can I unit test private methods?” It comes in other forms, too, like “how do I verify that one method in a class called another method in the same class?” The answer is: you don’t. You don’t verify that one method in a class called another method in that class. …

Dave DeLong, in A Better MVC, Part 5: An Evolution: “As I examined UIViewController and its role in apps more, I came to the conclusion that, despite its name, UIViewController is not a Controller, but a View. Almost everything that UIViewController deals with relates to view-level concepts, which heavily implies that it itself is a View, and should be treated …

How to unit test button taps on a view controller with XCTest

In the previous article in this series, we verified that our LoginViewController meets certain requirements for displaying text. When those tests pass, we have proof that our LoginViewController has the title “Podcaster” and that the username field’s placeholder text is “Username or email”. While tests like those are certainly useful for offloading some of the mental burden of manual testing, …