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.
You’ll probably have heard of MVVM but what about MVVM-C? @myurieff takes a look at coordinators – the secret ingredient in the MVVM-C architectual pattern – and illustrates how this one simple change can improve the structure and maintainability of your code.
iOS 11’s drag and drop APIs opened up a new range of possibilities for mobile app designs. In this tutorial, @sai_k1065 shows you how to get started by integrating these new APIs into a simple view controller.
There’s no doubt about it Bitcoin and it’s underlying blockchain technology are hot topics in the IT world but putting aside the hype surrounding bitcoin and cryptocurrencies, what is a block chain and why would you should you care about them? @reinder42 takes you walks you through the basics before showing you how to build an iOS app that uses the block-chain at it’s core.
Dependency management is one of the most important aspects of software design. Over the years, many approaches have been taken for tackling this problem but one of the most common is the use of dependency injection. In this tutorial, @gemmakbarlow shows you how to use Swinject – a popular open-source dependency injection framework for Swift that makes managing your Swift dependencies super-easy.
One of the lesser known features added to Xcode at last years WWDC was support for using named color assets. These allow you define color constants that are accessible from both code and from within Interface Builder’s color picker. Arnold Sakhnov explains how, with some thoughtful naming, organisation and management you can use this Xcode feature to create a great system for managing color within your applications.
Congratulations go to the @codevapor team this week with Vapor 3.0.0 finally hitting the streets. Re-written from the ground up the new release uses SwiftNIO – Apple’s new event-driven network framework – under the hood and also takes advantage of Swift’s Codable protocol to make parsing and serialization of HTTP messages both type safe and performant. 👏
Swift’s Codable protocol has made encoding and decoding Swift objects into external representations significantly easier. Although JSON is the most common of these, Codable also supports other external types such as plists as well. In this quick tutorial, @danielemargutti shows you how to make use of these capabilities to bring strongly typed access to an Info.plist.
@dawidcieslak discusses the problem of using live input data from external sensors such as the accelerometer, force-touch or the microphone to drive animations within your app. He then moves on to cover some of the techniques that you can use to smooth the input data in order to get more appealing animations on screen. Source for demo project used in Dawid’s talk can be found here and more details on Dawid’s framework Pulse can be found here.
The concept of self-documenting code is often a divisive topic, with some developers advocating it as best practice whilst others arguing there is no such thing. For me, writing code that is clear and easy to understand is something I always try to strive for if for no other reason than I know I’ll have forgotton what I was thinking when if and when I ever revisit the code. Unsuprisingly then, I found myself nodding along in agreement pretty much all the points @iwasleeg makes in this article.
Code reviews are nothing new. However, getting them right, and creating the right culture to ensure that code reviews add benefit, can sometimes be tricky. With this in mind, the team at @palantirtech have put together a useful guide that’s worth reading if you’re looking to polish and refine your own code review process.