The Great Swift Migration

Those of us who have adopted Swift before now did so knowing that there was a price to be paid later. Apple was very public about how the language was still evolving and future versions would be neither binary nor source compatible. Future versions of Swift would break existing codebases and require some refactoring to get working again.

Still, the iOS team at Comcast has been eagerly adopting Swift. The Xfinity TV app had been around for a while before Swift was introduced and has a large Objective-C code base, but we’ve been adding most of our new code in Swift and slowly replacing Objective-C with Swift whenever something needed a significant refactor.

With the GMC release of Xcode 8 and Swift 3.0, the day of reckoning is finally upon us. Swift 3.0 includes new API guidelines to make developing in Swift feel more natural and less like writing Objective-C with Swift syntax. These include changes to the standard library and to the way Apple’s Foundation classes are represented in Swift. Overall, I’m a fan of the changes, I think they are well thought out and will make developing in Swift even better, but there are A LOT OF THEM, and converting an application the size of Xfinity TV is a daunting task.

Over the next week I’m going to write about some of the interesting things I come across, and I’ll update this master post with links.