My thoughts on TDD
A natural workflow for software developers is to code and then conduct some manual tests to make sure things are working correctly. While this approach works, it also has some issues: It’s error-prone...
View ArticleThe basics of Swift Package Manager
Most of the code we write depends on external libraries. Libraries are pieces of code that can be used by many applications. The OS already comes with essential libraries we can use as building...
View ArticleThe structure of a Swift Package
In the previous article, we talked about what SPM is and how we can use it. We briefly talked about packages, but we are missing a key point: how to create them. In this article, we’ll explore...
View ArticlePublishing a Swift Package
This article is the third post in a series about SPM. If you don’t know what a Swift Package is, I recommend you to take a look at the first and second articles. Today we’ll explore how we can publish...
View ArticleSemantic versioning
In the previous article, we talked about how we can publish a swift package, and how we version it using semantic git tags. But what does semantic mean? In this article, we’ll explore this subject in...
View ArticleSPM command-line interface
In the preceding articles, we’ve been using Xcode as a tool for creating, developing, and fetching Swift packages. At the end of the day, the program doing the heavy job is SPM. Xcode interfaces with...
View ArticleWhen does a SwiftUI Environment get retained?
The answer depends on how we use SwiftUI. For an app entirely written using it, one might argue that it gets released whenever the app finishes. But what about an UIKit app that uses some SwiftUI...
View ArticleSwiftUI Tip: Enumerating a View State
Due to its declarative and reactive nature, SwiftUI works pretty well with this technique. Suppose we are building a screen that fetches a Github profile. We begin by describing the possible stages of...
View ArticlePicture in Picture Cheat Sheet (iOS)
TL;DR Here you can find a simple PiP implementation. Clone and run it, and then check the following components: PictureInPicture.swift (component that encapsulates the AVPictureInPictureController)...
View Article