Subscribe And Get 4 FREE Power Swift Playgrounds With The Latest Swift 3.0 Syntax

I started This Week in Swift for selfish reasons. In July 2014, Swift was still in Beta, Playgrounds would crash after only 100 lines of code, and we were all still super confused about Optionals... 150 issues later, it is time to end it...

One thing I’ve noticed recently in my code-base is that I tend to default to guard vs if. In fact, whenever I write an if statement, I facepalm myself and change it to a guard without thinking much. But that’s become a problem. There is in fact a difference between guard and if and thought does need to be put into which one to use.

A few months ago, I gave a talk titled Build Features, Not Apps at iOS Conf SG – you can view the full talk here. It was clearer than ever to me after WWDC 2016 that the future of apps is a web of distributed features instead of one concentrated app. Think of Apple Watch, Today’s Widget, Rich Notifications, App Search, iMessage Stickers, and the list goes on…

The try! Swift app runs on both iOS and watchOS, and I’d like to expand it to support fancy extensions and possibly something with iMessage. While I was ok duplicating the Model layer between the two platforms initially, as more extensions and platforms are something I want to code quickly on, it was time to move that code out into a framework.

I’ve been upgrading the try! Swift app to Swift 3.0 for what feels like 3 days now. But anyway, this morning my BUILD SUCCEEDED!! And although the process was definitely frustrating, a lot of the things that needed fixing were very repetitive and a good opportunity to refactor...