Making sure that your code follows swift coding styles and conventions can be a tedious task. Especially in larger teams. You can easily automate this process by using SwiftLint. SwiftLint is a great tool that will help you a lot. In this article we’ll get you started using SwiftLint. Installation… Read more »
Coding styles can be a religious topic for some developers. It’s one of those topics where everyone has a strong opinion. Opinions aside, once we agree on a coding style and start following it, it’s easy to forget to apply it. When we’re trying to solve a problem it’s easy… Read more »
A big problem currently unresolved in the swift world is in regards to enums. Filtering and equating enums in swift is verbose and might require some extra helper function or computed var on the enum itself. In HBCDigital I’m currently working with my team to a new reactive framework that… Read more »
You might be wondering what are throwable optionals. It’s simply an optional that will throw when force unwrapping. Throwable optionals don’t exist in the swift standard library. In this blog article we’ll create them and we’ll create a custom operator for them as well. This article has been inspired by… Read more »
It might seem strange at first to write an article on functions in swift. But functions in swift are a bit special and have some pretty cool characteristics. Hopefully by the end of this article you’ll understand them better. Three Things to Remember There are only three things that you… Read more »
In the first part of the fantastic world of Codable we tackled just one of the possible problems that in real life could make this amazing language feature hard to use. In this article we will try to cover another possible scenario that can happen while working on APIs poorly… Read more »
I was one of those people screaming to the miracle in the WWDC room when they first presented Codable in swift 4. I could not wait to put my hands on this new swift feature and starting using it. Personally I believe that this swift 4 feature is awesome, but… Read more »
In Swift you’ll be constructing objects all the time. It might seem simple at first glance but initializers in Swift are a pretty deep topic. In this article we’ll cover designated and convenience initializers. We’ll touch a bit on the failable initializers, required initializers and initializers in structs. We’ll finish… Read more »
Sometimes it’s better to crash then to have your app running in an inconsistent state. In this short article we’ll cover the options you have for crashing and what are the main differences between them. There’s only five, with some subtle differences. Let’s dive in. Five Ways to Fail You… Read more »
Last week we covered some basics on Optionals. This week we’ll dive in a bit deeper. We’ll take a look at the implementation of the optionals, optional chaining, nil-coalescing operator and a few more goodies. Granted, you’ll probably do just fine knowing the basics, but it’s fun to know how… Read more »