
Automate PRs With Danger
There are many tasks that can be automated when doing pull requests. And the more of these tasks we can automate the more time we'll have to focus on reviewing the actual code and focusing on the...

There are many tasks that can be automated when doing pull requests. And the more of these tasks we can automate the more time we'll have to focus on reviewing the actual code and focusing on the...

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...

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...

Big O notation is a tool we use to estimate how long a program or an algorithm will run. On this blog we've covered a lot of algorithms but we only touched on the big O notation. If you have a degree...

[caption id="attachment_2255" align="alignright" width="300"] image source: wikipedia.org[/caption] Enigma Machine was a famous cipher machine that the germans used during the World War 2. In its...

Bellman-Ford algorithm is a very versatile algorithm for finding the shortest path on an edge weighted directed graph. It differs from Dijkstra's algorithm in that it can handle the negative cycles...

Edge weighted digraphs can be used for a large number of things. In some cases we want to know if there's a directed cycle between the nodes (or vertices). For example, if we're working on a...

Queue is a simple and widely used data structure that operates on a first in first out principle. Sometimes you can hear them being referred to as FIFO (first in first out) queues. In this article...

Binary search trees are one of the most fundamental data structures in computer science. They are very efficient when inserting and searching for elements. And if you're preparing for a technical...

Last week we've talked about edge weighted digraphs in swift. This week we'll talk about a famous algorithm that's using that data structure. Dijkstra's algorithm is a simple and well-known algorithm...

You've probably heard of graphs in computer science, and you might even be dreading them a bit. After all, graphing algorithms are one of the favourite questions on technical interviews. In this...

Unified logging system in a relatively new logging mechanism that was introduced with iOS 10. It's blazingly fast and gives you a fine-grained control over your logs. In this article we'll explore...

Composite pattern is a nice little pattern that will help you manage complex hierarchies. It's commonly used to represent menus and directories/files. In this article we'll go over the theory and...

Iterator pattern is a perfect choice for you when you need to traverse a collection of objects. It's fairly simple and it's so widely used that most collection types implement this pattern in the...

Command pattern is a very simple pattern that allows you to decouple a class that invokes a command from a class that knows how to perform it. This gives you incredible flexibility. In this article...

Chain of responsibility is a well-known pattern that you probably ran into without realising it. In this article we'll continue our journey on design patterns in swift and learn more about chain of...

If your objects can have multiple states, then you should consider implementing a state pattern. In this article we'll cover some theory on state pattern, and then we'll go over an example on how to...

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...

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...

Continuing on our journey with design patterns, this week we'll visit the observer pattern. This is a really simple pattern to implement. We'll quickly go through some theory and get down to...

I get asked so many times to recommend books on iOS development (and development in general). I was a bit surprised at first, but then when I stepped back and thought about it, it made sense. For...

Today widgets are small view controllers that your users can add to their 'Today' view. They are good for displaying the most relevant information to your users. In this article we're going to create...

Abstract factory is one of the creational design patterns. You probably encountered it in your development without realising. Here we'll cover the swift version of the text-book version of the design...

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...

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...

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...

Optionals are one of the major language features of Swift. Understanding what they are and how to use them will be crucial if you want to code in Swift. Hopefully, by the end of this article you'll...

You might have heard that some of the swift native types are being converted from classes to structures. In this article, we'll explore structures and classes, we'll talk about values, references,...

Handoff is a great way for your users to resume an activity on any device. Let's say your users start reading an article on an iPhone, they can easily continue reading it right where they left off on...

You probably found yourself in a situation where you had to do a bunch of asynchronous tasks and you just wanted to get notified when all of them finish. There are two easy ways of doing this:...

If you ever needed to share data between your iOS apps and/or your application targets, there's a very easy way to do this using app groups. In this post we'll see how to share data between two apps...

If you need to know when a file has been modified, renamed, deleted... there's an easy way to do it using dispatch sources. In this post, we'll create a simple library that will notify you when a...

There are more ways than one to do concurrent operations on iOS. In this article, we'll cover how to use Operations and OperationQueue to execute concurrent operations. There's a lot to be said (and...

If you started your iOS development career in Objective-C, especially pre ARC Objective-C, you're probably very familiar with the above-mentioned concepts. If you started with Swift, some of them...
Firebase is an online database. It's called 'Realtime Database'. But it's much, much more than that. In this post, I'll go through one of my apps and the process of converting it from my REST API to...

NSCache is a great way to cache items like images. What I wanted was to persist the cached items and at the same time have a cache that's really easy to use. I came up with a little class that's...

Carthage is a decentralised dependency manager for iOS/OSX. In this post, we'll see how you can declare your project Carthage compatible and how to use Carthage in your projects. Carthage vs...

Generics is one powerful feature of swift that allows us to work with generic types. In this article, we'll cover what generics are, and how to use them in your project. Generics You must have come...

Everyone has heard of singletons. It's probably the simplest design pattern there is, yet, there are a few catches when implementing it. In this post, I'll go over the singleton design pattern and...

Today we'll create something cool, a temperature sensor and an iOS app that connects to it. For this project, we'll be using an Arduino with a BLE breakout circuit. On the iOS side, we'll be using...

There are more than a few search algorithms. Today we'll examine one of them, the Binary Search Algorithm, and we'll implement this algorithm using an array extension in swift. We'll also compare the...

With iPhone 6s came the 3D touch, and with it we got a few more options to interact with the users. In this short blog post we'll examine one of those options called 'Application Shortcuts', or...

Sorting algorithms are an important feature of modern computing, and in this article we'll examine some of the most common sorting algorithms in use today. Implementations of these algorithms will be...