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
Five Mistakes in Designing Mobile Push Notifications
Push notifications can, when used with care, be a great way to present information to your users and prompt them to interact with your app but when implemented poorly, they can can lead to an extremely poor user experience. To help you avoid potential pitfalls, @alitamjoyce has put together a list of five of the biggest mistakes developers make when adding push notifications to their apps. Have a look after all forewarned is forearmed.
iOS App Architecture — Part 1: Building Screens
When it comes to architectural patterns for your iOS app there’s a wide range of approaches to choose from. In this article from @VictorMaraccini we explore another – a relaxed application of Uncle Bob’s Clean Architecture that has helped the team at Nubank to develop a clean, testable and decoubled application architecture that supports their growing team.
Code
Using Closures with the Coordinator Pattern
Sticking with the architectural theme, this week also saw @twostraws providing a re-cap of the coordinator pattern (originally proposed by @khanlou) along with a discussion of a number of different techniques for connecting view controllers back to their associated coordinator classes.
Creating a Prisma-Like App with CoreML, Style Transfer and Turi Create
Machine learning has been a huge topic in the iOS community this year and one common challenge face by many developers when first getting started is how to generate their own models. In this article, @sai_k1065 shows you how to do just that, using Turi Create and CoreML to create your own style-transfer app.
Testing
Unit Testing Retain Cycles
Despite Apple’s great tooling, everyone gets bitten by retain cycles at some point or other. With this clever trick from @paulio87 this could be a thing of the past though, at least in your unit tests.
Tools
Measuring Performance with os_signpost
Sometimes overlooked, the iOS logging framework provides some powerful tools for exploring the behaviour and performance of your app. @dagostin has been looking at some of the API changes that were introduced in iOS 12 – specifically the addition of a new os_signpost
function that lets you add ‘signposts’ to your code that you can then use in measuring your app’s performance.
Swift Development with Visual Studio
I’ve been using Visual Studio Code on-and-off for a while now for non-Apple related development activities including writing this newsletter. As yet, I’d not used it for Swift Development though. That was until I came across this article from @mattt in which he explains how to setup and configure Visual Studio Code for Swift. Due to the limitations of Swift-LSP, it’s not fully-featured quite just yet but it’s a great example of what Swift’s support for the Language Server Protocol may mean for future Swift tooling.
Server-Side
Docker on macOS: Getting Started
In recent years Docker has become the de-facto approach for running small, light-weight containerised server-side applications. This same approach can be used for running your own, server-side Swift applications as well and in this article, @mataharimau show how to get started, providing an introduction to Docker itself before showing you how to build and deploy your own Kitura-based web app.
Videos
try! Swift NYC 2018 Videos
If you’re viewing playlist wasn’t long enough already, this week may see it getting a little longer with the release of a great set of videos from this years try! Swift NYC 2018 event. Worth having a look through as there are some interesting talks in there.
youtube.com
SpriteKit Particle Emitters
They say you should go out with a bang so to close things out this week, we have this video from @seanallen_dev in which he provides a nice introduction to SpriteKit particle emitters including tornadoes, rain and explosions! ?
Comment
Welcome to another week of Swift Developments! So with Black Friday and Cyber Monday disappearing in the rear-view mirror, it’s a bit of a change for Swift Developments this week. In the interests of cutting costs and making things a little more sustainable over the long-term, I’ve spent the last few days switching Swift Developments to a new email service provider. Hopefully I’ve managed to complete the transition successfully but if you do find any problems over the next few weeks then please let me know. I’m only a reply-button away! ? Have a great week.