Give your simulator superpowers

RocketSim: An Essential Developer Tool
as recommended by Apple

Introducing GitBuddy: Changelog and Release manager for GitHub

It’s been a few months since we released the initial version of GitBuddy but it’s the right time now to tell you all about our new best friend. We’ve been testing it intensively by making use of it in all our iOS related open-source projects at WeTransfer to create and manage our changelogs and releases. … 

 

Expressible literals in Swift explained by 3 useful examples

Expressible literals allow you to initialize types by making use of literals. There are multiple protocols available in the Swift standard library and chances are big that you’ve already been using one of those. An example is the ExpressibleByStringLiteral allowing us to initialize a String using surrounding double quotes instead of using the String(init:) method. … 

 

String Interpolation in Swift explained using 4 useful cases

Swift 5 introduced a decent version of string interpolation with SE-228 and updated the old version of the ExpressibleByStringInterpolation protocol that has been deprecated since Swift 3. The new version of this protocol allows us to write powerful extensions to existing types that define how objects interact when used within string interpolation. While developing apps … 

 

Using Custom debug descriptions to improve debugging

Custom debug descriptions can help you debug your own custom objects, structs, errors, and other types. Whenever you print out an object you might end up with basic information that doesn’t really help you solve your issue. Printing out a struct shows you all the values while you might only be interested in one of … 

 

URLs in Swift: Common scenarios explained in-depth

URLs are everywhere in an app we built. We reference local files using bundle paths, we fetch data from a path pointing to our API, and we fetch images to display visuals. While working with URLs we often need to verify things like making sure that it’s pointing to a file or that certain query … 

 

SwiftUI Previews: Validating views in different states

SwiftUI Previews allow us to develop a lot faster as we can now preview our views live in Xcode. Whenever we change a piece of code, our preview will update and show the rendered change accordingly. While developing a view that has to change into different appearances for certain states it helps a lot if … 

 

Custom Operators in Swift with practical code examples

Custom operators in Swift can make your code easier to read and simpler to maintain. Code can be written less lines of code while keeping it clear what is happening. Custom operators are also known as advanced operators and allow you to combine two instances with a self-chosen infix, prefix, postfix, or assignment operator. When … 

 

Custom subscripts in Swift explained with code examples

Custom subscripts in Swift allow you to write shortcuts to elements from collections or sequences and can be defined within classes, structures, and enumerations. You can use subscripts to set and retrieve values without exposing the inner details of a certain instance. An instance can define multiple subscripts and a subscript can have multiple input … 

 

NSFetchedResultsController extension to observe relationship changes

Apple provides us with great classes like the NSFetchedResultsController to interact with Core Data databases in our apps. The API evolved over the years with additions like support for the new NSDiffableDataSource. However, there are still scenarios where the default API is not helping enough. At WeTransfer, we heavily make use of Core Data. All … 

 

Testing private methods and variables in Swift

Testing private methods and variables is often something we run into when writing tests for our applications. You could think that it’s needed to fully verify that your code is working as expected and it helps you to get to that 100% code coverage. If you’re new to unit testing in Swift, you might first …