Author: Brian King

Core Data Type Safety with Swift

Core Data has had a long history, and it has emerged as the de facto persistence solution on iOS. An inescapable part of its past is its extremely dynamic nature, and developers’ efforts to get more help from the compiler in the form of code generation. Handcrafted Managed Objects Originally, Apple provided very little support […]

Read More

A table showing a summary of the interactions between reference types and modifiers and their effect on Swift method dispatch.

Method Dispatch in Swift

Method Dispatch is how a program selects which instructions to execute when invoking a method. It’s something that happens every time a method is called, and not something that you tend to think a lot about. Knowing how method dispatch works is vital when writing performant code, and can illuminate some of the confusing behavior […]

Read More

computer with typing image

XCTest and Optional Unwrapping

XCTest is the default test harness on iOS and Apple’s other platforms. It provides support for organizing test cases and asserting expectations in your application code, and reporting the status of those expectations. It’s not as fancy as some of the BDD frameworks like Quick and Cedar, but it has gotten much better than it used to be, and is my […]

Read More