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.
Swift
What’s New in Swift 5
With Swift 5 now officially released into the wild, you might be looking to get up the learning curve with all the new features. The good news is that this week, has seen a range of new resources being published around the community including this article from @KaramazovShogun which provides a great overview. On top of this, if you’re one of those people who like to live on the bleeding edge, then you can always look a head to the future with this article from @twostraws‘s in which he runs down some of the new features on the roadmap for Swift 5.1! Swift 5 is so yesterday’s news! ?
raywenderlich.com
JSON Decoding in Swift with Codable: A Practical Guide
One of the most common tasks for iOS apps is encoding data to and from JSON. With that in mind, both beginner and seasoned developers alike will benefits from this in-depth guide from @MatManferdini covering both the basics of Swift’s Codable protocol as well as more advanced topics such as how to flatten nested objects using keyed decoding containers.
matteomanferdini.com
Sponsored Link
Debug iOS Apps Remotely With AppSpector
Tired of bugs ? that you can’t reproduce? AppSpector gives you real-time remote access to your application logs, network requests, CoreData, UserDefaults, NotificationCenter and more. It takes only 3 minutes to set up, but it’s gonna save you countless hours on debugging.
appspector.com
Code
Handling iCloud Assets
Stepping away from the familiarity of the UIKit framework @jordanmorgan10 does battle with Apples iCloud infrastructure in an attempt to address some issues with the Photo’s Framework and iCloud assets that have gone AWOL.
swiftjectivec.com
Building URLRequests With Ease
Nearly every iOS app nowadays has some sort of networking component and that usually means working with URLRequest
. With it’s wide range of options constructing these requests isn’t always the simplest of tasks though. In this article, @JuanpeCatalan shows you how to simplify things by using the ever popular builder pattern to separate the construction of your URLRequests from your network clients and illustrates how, through the use of a fluent interface approach, you can easily chain different configuration options together.
medium.com
Making a Tinder-esque Card Swiping Interface Using Swift
@madebyon helps you brush up with your UIKit skills with a tutorial showing you how to build a card-swiping interface similar to Tinder.
exploringswift.com
It’s Time to Break Up With Your Networking library For URLSession
Bit of a networking theme this week but I liked the sentiment behind this post from @timothymiko. URLSession combined with Swift’s Codable protocol has made fetching and serializing / deserializing JSON data (which honestly makes up *most* of the networking requests we make) significantly easier than it used to be so next time you find yourself reaching for that third-party networking library take a moment to stop and think about whether you really need one.
tim.engineering
Tools
XcodeKit and Xcode Source Editor Extensions
With Alcatraz now a dim and distant memory, @zoejessica digs into the current world of Xcode extensions and how to write them. The bottom line is that extension access is still severely limited but there are still some useful things you can build to enhance your coding experience. In fact one such example is AccessControlKitty by Zoë herself, which is an Xcode extension that makes it super easy to change the access control level of code selection in the editor!
nshipster.com
Automated Xcode Build Numbers, Early 2019 Edition
If your looking to automate your Xcode build numbers without polluting your commit history, @parrots has published an updated version of his Xcode build number script that has you covered. Think this might be getting added to all my Xcode projects in future.
curtisherbert.com
SwiftInfo
Another useful little tool that has been published in the last couple of of weeks is this one from @rockthebruno. SwiftInfo is a small command line tool that you can hook into your build process and tracks and analyses useful metrics for your app such as .ipa size, test coverage and the number of dependencies your project has. You can even write your own metrics if you need to.
github.com
Libraries
CryptoSwift
Congratulations go to @krzyzanowskim this week. After four years of hard work, CryptoSwift – Marcin’s collection of secure cryptographic algorithms implemented in Swift (and one of Swift’s most popular cryptographic libraries) has reached a major milestone with a full 1.0.0 release. If you’re looking to get up to speed @dagostin has also written a super quick introductory tutorialto get you started.
github.com
Testing
Automated UI Testing in Swift & iOS
Whilst UI testing provides a number of benefits in and of itself for checking that your apps user interface behaves as expected, as @jrwilliams_ios points out in this article, there is also a second, less obvious benefit that creating UI tests for your app also brings – accessibility.
medium.com