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.
Design
Tap to Dismiss
It’s not uncommon to display modal dialogue boxes in iOS apps, especially if you’re going for a more custom UI design, but have you thought about how the user actually dismisses your modal? @taptodismiss has, and has written up some good tips on where to put those cancel buttons. There’s much more to it that I realised.
Animation Principles for UX and UI Designers
If like me, you’ve not got a particularly formal UI design background, you’ll probably find that the first paragraph of this article from @vj_hiriji will resonate – it did for me. It’s actually a great article overall and provides a useful introduction to animation principles in general. Definitely worth a read.
Code
Keychain Services API Tutorial for Passwords in Swift
As a developer, it’s your responsiblity to keep your users data safe. One great way to do this is via the iOS Keychain – a C-based API that lets you securely store passwords and other data. However, being a C-based API, it’s not that friendly for us Swift developers so in this tutorial, @flexaddicted shows you how to create your own Swift wrapper to hide all those C-based interactions.
ISO-8601, YYYY, yyyy, and Why Your Year May Be Wrong
As the end of year drew around, @ericasadun provided a great reminder about date formatting in Swift and how if you’re not careful, your dates might not be what you expect.
QR Code Generation with a Custom Logo and Color using Swift
QR codes are versitile, fault-tolerant 2D bar codes that can be scanned pretty much all Apple devices. As of iOS 11, users have the ability scan bar natively from within the iOS camera app and since the introduction of the CIQRCodeGenerator
filter in Core Image, developers also have a great way of *generating* QR codes as well. However, by default, the CIQRCodeGenerator
class generates black and white QR codes – these are obviously functional but not all that appealing so in this tutorial, @twannl shows you how to jazz things up a bit by incorporating color and a custom logo into your generated codes.
Detecting Internet Access on iOS 12+
For some years now, Apple’s Reachability sample code has been the defacto starting point for detecting network access in iOS apps. However, last year’s WWDC introduced the Network
Framework for iOS 12 and onwards that included a new NWPathMonitor
class that facilitates monitoring of changes in network state without having to introduce third party libraries or Apple sample code. At this point the documentation is still pretty sparse but to get you started @ross_w_butler has written a useful introductory tutorial.
Testing
Integration Testing for Memory Leaks
You’ll no doubt have come across the concept of unit testing and how you can use it to test that your app behaves as you expect. Rather than testing a single unit of code though, what if you extended this idea to test the interactions between different classes, including catching bugs like memory leaks? This is the idea that Matthew Healey and his colleagues at SoundCloud have been pursuing and one that they seem to have been having some success with.
Tools
Danger Swift
The popular continuous integration helper tool Danger by @orta and others is not new to the Swift and iOS ecosystem. What *is* new though is that, due to some hard work from Orta and @fmeloni1 over the last year we now have a version that allows you to write your Danger files in Swift directly! Great news and with a whole bunch of supporting documentation it’s never been easier to get started!
ShapeShift
Playgrounds are a great place for trying out your Swift code and things got a little easier over the festive period with this useful new tool from @johnsundell that takes a folder containing a bunch of Swift files and converts it into an iPad compatible Playground.
Career
The Complete Guide to iOS and Swift Job Interviews
For many, the New Year, means a new start and potentially also the hunt for a new job. With this in mind, one of the most extensive and potentially useful articles I saw over the Christmas period was this one from @twostraws with some great advice on how to land your next role.
Comment
Happy New Year! And here we are – 2019. I’ve really enjoyed the time off over the Christmas and New Year period as it’s given me some time to read, work on a couple of side projects that I’ve been neglecting, spend time with the family and generally relax. However it’s time to get back to work and bring you the best that the Swift and iOS development community has to offer. With this in mind there have actually been some great articles over the last couple of weeks so today, we’re going to gently ease ourselves into the new year with a re-cap of some of the best articles from the festive period. As ever, get in touch if you have any comments or suggestions (I really do read and reply to every email!) and in the mean time – Enjoy!