Will you ever be able to write Android apps in Swift? I can’t imagine this becoming super popular (just like I don’t think that iOS apps written in Java would become popular if it were possible). However it’s an interesting experiment and there may be some value to being able to share bits of model code between platforms.
Xcode’s refactoring support has always been a bit of a joke, but if you’ve switched to Swift in the last 18 months then the joke is over because it simply doesn’t work at all. I’m sure it’s being worked on, and I’m sure it’ll be great when it comes, but until then you might want to check out this plugin from John Holdsworth. It only supports renaming, but its better than nothing.
Playgrounds are great, but what if the code is already inside your app? This plugin from Shengjia Wang allows you to select some code in Xcode and quickly run it. The biggest limitation is (fairly obviously) that you can’t make reference to anything outside the scope of what’s selected, but the same limitation exists with copying some code into a playground, so you’re not really any worse off.
In response to the NSNotificationCenter release notes I linked in the last issue there have been several articles published this week discussing the observer pattern. Jared Sinclair advocates against the use of notifications in almost all circumstances. Then, Ben Sandofsky wrote on a similar subject in his article discussing Delegates vs Observers and Jared finishes it off by wondering what a first party Swift implementation of KVO might look like.
Another follow up from last week. In this article David Owens digs further into the guard argument. However the main point of the post is that there’s no right answer to this and that you certainly shouldn’t be aiming for any kind of generic “you must do this to be correct”.
Arkadiusz Holko with a look at various approaches on how to architect your table view controllers and cells. He ends up with an approach where the view controller with no fragile switch statements, which is type safe and in fact doesn’t need to be modified at all in order to add new cells. Interesting approach.
It’s just a few pointers… right? 😎
Kit Oliynyk puts down some guidelines for modern animation on mobile devices. Most of the examples here feel like motion graphics mockups rather than examples from real apps and so they feel a bit over the top in most cases, but the article brings up some great points so make sure you read the words, and don’t just skim over the pretty pictures. 😇
Rene Ritchie imagines a world where any iOS app can be bought from any device (including the web). I like the idea but my gut feeling is Apple have held back from this due to the potential confusion of purchasing apps for devices that the user doesn’t own. Android (which has had this feature for a long time) handles this by having all owned devices registered with the purchasing account so it knows which apps are compatible. I can’t see any good reason Apple wouldn’t be able to do something similar though.
Love what you do, do it anywhere, and make a difference.
Inspiring and enabling people everywhere to live free of chronic disease
Making it fun and easy to discover and share knowledge.
Brutal, but funny. 😆