Getting Started with NSTouchBar for macOS using Storyboards

With the addition of the Touch Bar comes the ability to customize it for your own applications. From simply adding buttons to incorporating sliders or color pickers, programming the Touch Bar is a new, creative way to add shortcuts and other functionality into your Mac app.
Read more on Getting Started with NSTouchBar for macOS using Storyboards…

A Guide to Interacting with iBeacons in iOS using Swift

I’ve recently been working on an iOS project that uses iBeacons. In this post, I’ll provide a comprehensive guide for working with iBeacons in iOS using Swift. I’ll describe what iBeacons are, how you can use them, and what you should know about the programming model for interacting with them in iOS. I’ll also share some of the best practices that I learned.
Read more on A Guide to Interacting with iBeacons in iOS using Swift…

Customizing UIWebView for PDFs in Swift

UIWebViews are a handy way to show web content in an iOS app. They are especially useful for showing PDFs that are stored remotely. Apple largely treats UIWebViews like a black box: Documentation warns that they should not be subclassed. So what if you want to customize how they show PDFs? Recently, I went after two customizations to change the default UIWebView behavior.
Read more on Customizing UIWebView for PDFs in Swift…

A Swift Architecture for Managing State: Revised

In my previous blog post, I wrote about an approach for managing state in a Swift app. Following that post, some changes were made to the Swift language that deprecated some convenient syntax my approach relied on. After some thinking, and with a better understanding of Swift’s approach to mutability, I’ve slightly revised this architecture to reduce a lot of friction. Read more on A Swift Architecture for Managing State: Revised…

Testing with Swift – Approaches & Useful Libraries

I’ve been working on developing an iOS app in Swift. It’s my first experience developing in pure Swift, without any Objective-C. This project has taught me a lot about the current state of testing in Swift, including different testing approaches and best practices. In this post, I’ll share some of my experiences and discuss how we have approached testing different types of Swift code. I’ll also talk about some useful testing libraries. Read more on Testing with Swift – Approaches & Useful Libraries…

Go Home Swift Compiler, You’re Drunk

Swift is approaching its two year anniversary. Thus far it has experienced high adoption and continues to grow as developers transition away from Objective-C. As a programming language, Swift is great. It feels productive to work in, and has a nice variety of modern language features.

Read more on Go Home Swift Compiler, You’re Drunk…

A Declarative Architecture for Swift Apps

Update: I’ve written a new blog post describing how I’ve improved upon this architecture.

I’ve long been interested in seeking ways to design software in a declarative way. That’s why I’ve lately been very interested in tools like Om Next that provide good patterns for managing the state of your entire application and rendering UI based off that state.

I was recently assigned to a new iOS project using Swift, which was a great opportunity to to learn Apple’s new language and see if I could leverage it to bring a greater level of declarativeness to iOS programming. Read more on A Declarative Architecture for Swift Apps…