Swift Developments is a hand-curated newsletter containing a weekly selection of the best links, videos, tools and tutorials for people interested in designing and developing their own apps using Swift.
So if you were waiting for the WWDC dates, then it looks like the wait is over! This years WWDC is going to be held 13th – 17th June in San Fransisco and like last year, tickets are going to be available via a random draw. Best if luck if you are intending to throw your name in the hat.
Another thing that you might have missed during yesterday’s WWDC excitement, is the launch of Developer Insights Developer Insights. This Apple mini-site provides articles and videos on how to build a business on the App Store and coverstopics such as developing your App Store presence and how to attract more customers to your pages. I don’t know whether this is the first step toward Apple re-vamping the App Store but it’s worth a poke around if you have apps out in the wild.
Anyway, enough of the Apple announcements, let’s get on with this weeks links.
Having talked about Google investigating the longer-term use of Swift on their Android platform in last weeks issue, this week saw a significant step along that path with this pull request that adds an Android target for the Swift standard library. As I mentioned last week, it will be some time yet before we see Swift on Android, but this represents the starting point on that journey and sees the Swift community sticking to its plan for Swift portability across different platforms. It’s great to see and congratulations to all involved.
Honestly, when I first saw the title of this article I groaned a little. I thought it was going to be another of those articles where someone tells you how to game the App Store review process to boost your app to the top of the rankings. After all 10,000 reviews in 4 weeks is no mean feat. The reality of this article however is completely different. In it @warpling talks about how his app BlackBox, deviates from the prototypical time-based alert view model to leverage human psychology to deliver an integrated, experience to whilst simultaneously getting users to want to leave an app review. And all within the rules of the App Review Guidelines. It’s an interesting approach.
Swift is still developing and evolving and now, nearly a year and a half after it was first released, there are an increasing number of developers moving to the language. Part of the journey for a developer learning Swift for the first time is Swift’s type system and once the basics of the type system have been established, it reaches a point where it is important to understand the different forms of type checking that are available in Swift. This is where this article from @benjaminencz comes in. It’s a good read, especially if you are coming up the Swift learning curve.
Having spent this week digging around in a legacy C/C++ code base, this article from @JeroenMoons particularly resonates for me. In it, he discussions dragons, technical debt and the approaches you can take to rescue things by gradually refactoring the code base toward a better place. It also highlights the importance of an automated test framework in this journey and is a good reminder if your faced with a similar challenge.
With the multitude of orientations and screen sizes now available on Apple devices things are a little more complicated than they used to be. In this article, @richturton takes a look at how to use UISplitViewController to adapt to this ever-changing landscape (or portrait).
As part of their frameworks, Apple provide us with a large number of view controllers for presenting our views in different ways but if you want something a little different you’ll often find yourself turning toward UIPresentationController. If you’ve not used it before, the interface to UIPresentationController can be a little confusing and in this article, @Steve_Lipton walks us through the basics.
The development team at Facebook have been busy recently and if you’re still developing using Objective-C, this new library is one you will want to take a look at. As you know, one of the tricky aspects of Objective-C (and Swift programming for that matter) is retain cycles and the associated memory leaks that they can often trigger. Tracking them down usually means firing up Instruments and watching for spikes / leaks in memory but with this trio of new libraries, the team at Facebook have made the process a whole load easier, automating much of this process.
Another library I came across this week is this one from the team at @yalantis. It’s ideal if you’re working with UICollectionViews and provides you with a nice way to transition between two different collection view layouts.
If you think about it, there are three main development paradigms currently vying for attention the Swift community: Object-oriented, Functional, and Protocol-Oriented Programming. In this video, @dimsumthinking delivers yet another great talk about we should be blending the best of each of these approaches if we are to write idiomatic Swift.
I’m a big fan of unit testing and mocking frameworks and when writing Objective-C relied heavily on OCMock to generate many of the mocks I needed for my tests. With the arrival of Swift though, things changed. There was no run-time swizzling to help out, but instead, we did gain the power of protocols. In this talk, @nerdonica walks us through just how easy it is to create mocks and stubs in modern day Swift.