Better JSON parsing in Swift

Some time after this post was published Apple released Swift 4, which includes Codable. Every since Swift came out, the ObjectMapper library has been the go-to tool for many people's JSON parsing needs, including me. It has been a great tool, especially during the transition from Objective-C to Swift as…

Quick tip: Deleting merged branches

If you are working with feature branches, a common approach is to delete the feature branch after it has been merged back to your main development branch. This helps to keep your project tidy and organized. Here are two short bash snippets to delete merged branches. Deleting local branches that…

Replacing Core Data with Realm

The side project mentioned in the previous post requires some data to be persistent. While I had looked at Realm in the past, eventually I drifted back to Core Data. This was mostly due to NSFetchedResultsController and the fact that it enables animating changes to your table- and collectionviews. At…

Making a Swift app themeable

Recently I started working on a new side project which includes an iOS application written in Swift. Because it's a new project that should support multiple themes eventually, it seemed wise to add theming from the start. While there are multiple libraries that let you theme your app, including css-like…

Quick tip: Replacing text with sed

Sometimes you may find yourself needing to replace multiple occurrences of some string or expression in one or more text files. Recently I found myself in one of those scenario's, which inspired this short post. The problem at hand was the fact that property declarations in a fairly large Objective-C…

Using custom fonts with lining numbers on iOS

Using a custom font in your app can really improve it's look and feel. However, some fonts will render non-lining lowercase numbers by default. This works really well for regular text, but not so much when you're only using uppercase characters, as is often the case for header titles. A…