Tibor Bödecs

Tibor Bödecs

Binary Birds Kft.

Server side Swift enthusiast, book author, content creator.

Get in touch with Tibor


140 posts

Encoding and decoding data using the Hummingbird framework


URL encoded requests over multipart form data? Maybe JSON and raw HTTP post body types? Let me explain all of this.

Hummingbird routing and requests


Beginner's guide to learn all about routing and request handling using the Hummingbird server-side Swift framework.

Beginner's guide to server-side Swift using the Hummingbird framework


Learn about Swift on the server by creating a simple application using the brand new HTTP server library called: Hummingbird.

Running and testing async Vapor commands


In this article I'll show you how to build asynchronous Vapor commands and how to test them using ConsoleKit.

Running tasks in parallel


Learn how to run tasks in parallel using the old-school tools and frameworks plus the new structured concurrency API in Swift.

The abstract Vapor service factory design pattern


In this tutorial I'm going to show you how you can create an abstract driver-based component for the Vapor framework.

SwiftNIO tutorial - The echo server


This is a beginner's guide to learn the basics of the SwiftNIO network app framework by building a basic TCP echo server.

Easy multipart file upload for Swift


Let me show you how to create HTTP requests using multipart (form data) body without a third party library. Simple solution.

Utilizing Makefiles for Swift projects


In this tutorial I'll show you how to use Makefiles for server-side Swift projects to help running utility tasks in a more simple way.

Lenses and prisms in Swift


Beginner's guide about optics in Swift. Learn how to use lenses and prisms to manipulate objects using a functional approach.

Beginner's guide to modern generic programming in Swift


Learn the very basics about protocols, existentials, opaque types and how they are related to generic programming in Swift.

Introduction to SPM artifact bundles


In this tutorial I'm going to show you how to use the new binary target related artifact bundle using the Swift package manager.

Beginner's guide to Swift package manager command plugins


Learn how to create command plugins for the Swift Package Manager to execute custom actions using SPM and other tools.

Swift visitor design pattern


The visitor design pattern in Swift allows us to add new features to an existing group of objects without altering the original code.

Working with diffable data sources and table views using UIKit


In this tutorial we're going to build a screen to allow single and multiple selections using diffable data source and a table view.

Async HTTP API clients in Swift


Learn how to communicate with API endpoints using the brand new SwiftHttp library, including async / await support.

Beginner's guide to Swift arrays


Learn how to manipulate arrays in Swift like a pro. This tutorial covers lots of useful array related methods, tips and tricks.

The repository pattern for Vapor 4


In this article I'm going to talk about the repository design pattern and give you a few Fluent ORM tips for your Vapor 4 app.

How to use a Swift library in C


In this tutorial, we're going to build a C app by importing a Swift library and talk a bit about the Swift / C Interoperability in general.

UIKit - loadView vs viewDidLoad


When to use these methods? Common questions and answers about the iOS view hierarchy including memory management.

10 little UIKit tips you should know


In this article I've gathered my top 10 favorite modern UIKit tips that I'd definitely want to know before I start my next project.

Progressive Web Apps on iOS


This is a beginner's guide about creating PWAs for iOS including custom icons, splash screens, safe area and dark mode support.

How to create a Swift package collection?


In this tutorial I'm going to show you how to create your own package collection from your favorite Swift libraries.

How to write HTML in Swift?


This tutorial is all about rendering HTML docs using a brand new DSL library called SwiftHtml and the Vapor web framework.

The future of server side Swift


What's going to happen with Swift on the Server in 2022? Distributed actors, Vapor 5, some predictions and wishes.

Building a global storage for Vapor


This tutorial is about a shared global storage that you can implement using a common design pattern in Vapor 4.

Building tree data structures in Swift


This tutorial is about showing the pros and cons of various Swift tree data structures using structs, enums and classes.

Practical guide to binary operations using the UInt8 type in Swift


Introduction to the basics of signed number representation and some practical binary operation examples in Swift using UInt8.

All about the Bool type in Swift


Learn everything about logical types and the Boolean algebra using the Swift programming language and some basic math.

How to build better command line apps and tools using Swift?


These tips will help you to create amazing CLI tools, utility apps, server side projects or terminal scripts using the Swift language.

Swift structured concurrency tutorial


Learn how to work with the Task object to perform asynchronous operations in a safe way using the new concurrency APIs in Swift.

Swift actors tutorial - a beginner's guide to thread safe concurrency


Learn how to use the brand new actor model to protect your application from unwanted data-races and memory issues.

Beginner's guide to the async/await concurrency API in Vapor & Fluent


Learn how to convert your existing EventLoopFuture based Vapor server app using the new async/await Swift feature.

Introduction to async/await in Swift


Beginners guide to the new async/await API's in Swift 5.5. Interacting with sync code, structured concurrency, async let.

Dynamic libraries and code replacements in Swift


How to load a dynamic library and use native method swizzling in Swift? This article is all about the magic behind SwiftUI previews.

Declarative unit tests for Vapor


Learn how to test your server side Swift backend app in a declarative style using a lightweight library called Spec.

How to design type safe RESTful APIs using Swift & Vapor?


Learn to make proper data transfer objects for CRUD operations and integrate them both into the client and server side API layer.

Unsafe memory pointers in Swift


Learn how to use raw pointer references, interact with unsafe pointers and manually manage memory addresses in Swift.

Memory layout in Swift


Start learning about how Swift manages, stores and references various data types and objects using a memory safe approach.

How to use C libraries in Swift?


Learn how to use system libraries and call C code from Swift. Interoperability between the Swift language and C for beginners.

Building static and dynamic Swift libraries using the Swift compiler


This tutorial is all about emitting various Swift binaries without the Swift package manager, but only using the Swift compiler.

The Swift compiler for beginners


Learn how to build executable files using the swiftc command, meet the build pipeline, compilers and linkers under the hood.

Custom working directory in Xcode


Learn how to set a custom working directory in Xcode to solve one of the most common beginner issue when using Vapor.

File upload API server in Vapor 4


Learn how to build a very simple file upload API server using Vapor 4 and URLSession upload task on the client side.

AJAX calls using Vapor 4


Learn how to implement Asynchronous JavaScript and XML (AJAX) calls using Leaf templates and Vapor 4 as a server.

File upload using Vapor 4


Learn how to implement a basic HTML file upload form using the Leaf template engine and Vapor, all written in Swift of course.

Event-driven generic hooks for Swift


In this article I am going to show you how to implement a basic event processing system for your modular Swift application.

Getting started with SwiftIO


SwiftIO is an electronic circuit board that runs Swift on the bare metal. It can control sensors, displays, lights, motors and more.

How to build macOS apps using only the Swift Package Manager?


In this article we're going to create a macOS application without ever touching an Xcode project file, but only working with SPM.

Logging for beginners in Swift


Learn how to print variables to the debug console using different functions such as print, dump, NSLog and the unified os.log API.

How to define strings, use escaping sequences and interpolations?


As a beginner it can be hard to understand String interpolation and escaping sequences, in this tutorial I'll teach you the basics.

Swift on the Server in 2020


Why choose Swift as a backend language in 2020? What are the available frameworks to build your server? Let me guide you.

10 short advices that will make you a better Vapor developer right away


As a beginner server side Swift developer you'll face many obstackles. I'll show you how to avoid the most common ones.

How to store keys in env files?


In this tutorial I'll show you how to save and load secret keys as base64 encoded strings using dotenv files in Vapor 4.

Table joins in Fluent 4


In this quick tutorial I'm going to show you how to join and query database models using the Fluent ORM framework in Vapor 4.

Websockets for beginners using Vapor 4 and Vanilla JavaScript


Learn how to create a websocket server using Swift & Vapor. Multiplayer game development using JavaScript in the browser.

Building and loading dynamic libraries at runtime in Swift


Learn how to create a plugin system using dynamic libraries and the power of Swift, aka. modular frameworks on the server-side.

What's new in Swift 5.3?


Swift 5.3 is going to be an exciting new release. This post is a showcase of the latest Swift programming language features.

Sign in with Apple using Vapor 4


A complete tutorial for beginners about how to implement the Sign in with Apple authentication service for your website.

The Swift package manifest file


This article is a complete Swift Package Manager cheatsheet for the package manifest file, using the latest Swift 5.2 tools version.

Server side Swift projects inside Docker using Vapor 4


Learn how to setup Vapor 4 projects inside a Docker container. Are you completely new to Docker? This article is just for you.

Modules and hooks in Swift


Learn how to extend your application with new functionalities using a loosely coupled modular plugin system written in Swift.

All about authentication in Vapor 4


Learn how to implement a user login mechanism with various auth methods using sessions, JWTs, written in Swift only.

A generic CRUD solution for Vapor 4


Learn how to build a controller component that can serve models as JSON objects through a RESTful API written in Swift.

The anatomy of Vapor commands


Learn how to build and run your existing Vapor apps using various command line arguments, flags and environments.

How to use middlewares in Vapor 4?


Learn how to create middlewares for a Vapor based server side Swift application to handle common routing functionalities.

How to write Swift scripts using the new Command API in Vapor 4?


Shell scripts are essentials on the server side. Learn how to build Swift scripts for your backend apps using property wrappers.

Get started with the Fluent ORM framework in Vapor 4


Learn how to use the Fluent ORM framework. Migrations, schemas, relations powered by PostgreSQL, written in Swift.

How to set up pgSQL for Fluent 4?


This is a tutorial for beginners about using PostgreSQL. I'll show you how to automatically backup and restore the database.

How to create your first website using Vapor 4 and Leaf?


Let's build a web page in Swift. Learn how to use the brand new template engine of the most popular server side Swift framework.

How to download files with URLSession using Combine Publishers and Subscribers?


Learn how to load a remote image into an UIImageView asynchronously using URLSessionDownloadTask and the Combine framework in Swift.

Beginner's guide to Server side Swift using Vapor 4


Learn how to build and host your very first backend application using Vapor 4 and the brief history of server side Swift.

What are the best practices to learn iOS / Swift in 2020?


Are you learning iOS development? Looking for Swift best practices? This is the right place to start your journey as a mobile application developer.

Custom views, input forms and mistakes


Just a little advice about creating custom view programmatically and the truth about why form building with collection views sucks.

A simple HTTP/2 server using Vapor 4


Get started with server-side Swift using the Vapor 4 framework. Learn how to build a really simple HTTP/2 backend server.

How to write services for VIPER?


Not everything is a VIPER module. In this article I'll show you how do I separate the service layer from the modules, using Swift.

How to build SwiftUI apps using VIPER?


In this tutorial I'll show you how to combine SwiftUI with the VIPER architecture in a real world iOS application example.

Picking and playing videos in Swift


Learn how to record or select a video file using a video picker controller and the AVPlayer class, written entirely in Swift 5.

What's new in Vapor 4?


Vapor is the most popular server side Swift web application framework. This time we'll cover what's new in Vapor 4.

Swift init patterns


The ultimate guide how to init your Swift data types, with the help of designated, convenience, failable intitializers and more.

URLSession and the Combine framework


Learn how to make HTTP requests and parse the response using the brand new Combine framework with foundation networking.

Promises in Swift for beginners


Everything you ever wanted to know about futures and promises. The beginner's guide about asynchronous programming in Swift.

Building input forms for iOS apps


Learn how to build complex forms with my updated collection view view-model framework without the struggle using Swift.

Uniquely identifying views


Learn how to use string based UIView identifiers instead of tags. If you are tired of tagging views, check out these alternative solutions.

Mastering the VIPER architecture


Learn how to master the VIPER architectural design pattern, with some protocol oriented programming techniques using Swift.

VIPER best practices for iOS developers


In this tutorial I'm going to show you a complete guide about how to build a VIPER based iOS application, written entirely in Swift.

Styling by subclassing


Learn how to design and build reusable user interface elements by using custom view subclasses from the UIKit framework in Swift.

Beginners guide to functional Swift


The one and only tutorial that you'll ever need to learn higher order functions like: map, flatMap, compactMap, reduce, filter and more.

Picking images with UIImagePickerController in Swift 5


Learn how to get an image from the photo library or directly from the camera by using the UIImagePickerController class in Swift 5.

How to use the result type to handle errors in Swift 5?


From this tutorial you can learn how to utilize the do-try-catch syntax with the brand new result type to handle errors in Swift.

All about the Swift Package Manager and the Swift toolchain


Learn everything about the SPM architecture. I'll also teach you how to integrate your binary executable into the Swift toolchain.

Lazy initialization in Swift


Learn how to use lazy properties in Swift to improve performance, avoid optionals or just to make the init process more clean.

Swift object pool design pattern


In this quick tutorial I'll explain & show you how to implement the object pool design pattern using the Swift programming language.

UITableView tutorial in Swift


This guide is made for beginners to learn the foundations of the UITableView class programmatically with auto layout in Swift.

Swift 5 and ABI stability


Apple's Swift 5 language version will be a huge milestone for the developer community, let's see what are the possible benefits of it.

Custom UIView subclass from a xib file


Do you want to learn how to load a xib file to create a custom view object? Well, this UIKit tutorial is just for you written in Swift.

Swift facade design pattern


The facade design pattern is a simplified interface over a complex subsystem. Let me show you a real quick example using Swift.

Iterator design pattern in Swift


Learn the iterator design pattern by using some custom sequences, conforming to the IteratorProtocol from the Swift standard library.

Generating random numbers in Swift


Learn everything what you'll ever need to generate random values in Swift using the latest methods and covering some old techniques.

Swift adapter design pattern


Turn an incompatible object into a target interface or class by using a real world example and the adapter design pattern in Swift.

Swift dependency injection design pattern


Want to learn the Dependency Injection pattern using Swift? This tutorial will show you how to write loosely coupled code using DI.

Ultimate Grand Central Dispatch tutorial in Swift


Learn the principles of multi-threading with the GCD framework in Swift. Queues, tasks, groups everything you'll ever need I promise.

Swift delegate design pattern


The delegate design pattern is a relatively easy way to communicate between two objects through a common interface, protocol in Swift.

UICollectionView data source and delegates programmatically


In this quick UIKit tutorial I'll show you how to create a simple UICollectionView without Interface Builder, but only using Swift.

Mastering iOS auto layout anchors programmatically from Swift


Looking for best practices of using layout anchors? Let's learn how to use the iOS autolayout system in the proper way using Swift.

Swift command design pattern


This time I'm going to show you a behavioral pattern. Here is a little example of the command design patten written in Swift.

Swift prototype design pattern


The prototype design pattern is used to create clones of a base object, so let's see some practical examples written in Swift.

Comparing factory design patterns


Learn what's the difference between static factory, simple factory, factory method and abstract factory using the Swift language.

Swift abstract factory design pattern


Let's combine factory method with simple factory voilá: here is the abstract factory design pattern written in Swift language!

Swift factory method design pattern


The factory method design pattern is a dedicated non-static method for hiding the creation logic of an object. Let's make it in Swift!

Swift simple factory design pattern


This time let's talk about the simple factory design pattern to encapsulate object creation in a really simple way using Swift.

Swift static factory design pattern


In this article I'll teach you about the static factory design pattern and show some use cases using the Swift programming language.

Swift builder design pattern


Learn how to implement the builder pattern in Swift to hide the complexity of creating objects with lots of individual properties.

Swift singleton design pattern


Singleton is the most criticized design pattern of all time. Learn the proper way of using Swift singleton classes inside iOS projects.

How to use iCloud drive documents?


Learn how to sync files and data through a shared iCloud drive folder using the latest version of Swift programming language.

UIColor best practices in Swift


Learn what are color models, how to convert hex values to UIColor and back, generate random colors, where to find beautiful palettes.

iOS custom transition tutorial in Swift


In this tutorial, you'll learn how to replace the push, pop and modal animations with custom transitions & percent driven interactions.

Ultimate UICollectionView guide with iOS examples written in Swift


Learn how to use UICollectionView, with highly reusable UIKit components and some MVVM pattern without the going nuts with index path calculations.

The ultimate VIPER architecture tutorial


Learn how to write scalable iOS code using the VIPER architecture with some MVVM and MVC tricks and coordinators in mind.

Networking examples for appleOS


Learn how to use Bonjour, with UDP/TCP sockets, streams and how to communicate through CoreBluetooth or the watch APIs.

How to parse JSON in Swift using Codable protocol?


In this Swift tutorial, I'd like to give you an example about getting and parsing JSON data using URLSession and Codable protocol.

Deep dive into Swift frameworks


Learn everything about Swift modules, libraries, packages, closed source frameworks, command line tools and more.

UICollectionView cells with circular images plus rotation support


Learn how to make rounded corners for UIImageView items wrapped inside collection view cells, with rotation support.

Self sizing cells with rotation support


How to make self sizing cells in Swift both for table & collection views supporting orientation changes and dynamic font types.

How to call C code from Swift


Interacting with C libraries from the Swift language is really amazing, from this post can learn the most of C interoperability.

Swift Package Manager tutorial


Learn how to use the Swift Package Manager to handle external dependencies, create your library or app on macOS and Linux.

iOS Auto Layout tutorial programmatically


In this great iOS Auto Layout tutorial I'll teach you how to support rotation, use constraints, work with layers, animate corner radius.

How to launch a macOS app at login?


In this tutorial I'll show you how to launch a completely sandboxed macOS application on system startup written in Swift.

How to make a Swift framework?


Creating a Swift framework shouldn't be hard. This tutorial will help you making a universal framework for complex projects.

Swift enum all values


In this quick tutorial I'll show you how to get all the possible values for a Swift enum type with a generic solution written in Swift.

Asynchronous validation for Vapor


Learn how to validate input data using an async technique. Unified request validation API for your server side Swift app.

Everything about public and private Swift attributes


Have you ever heard about Swift language attributes? In this article I'm trying to gather all the @ annotations and their meanings.

How to create reusable views for modern collection views?


A quick intro to modern collection views using compositional layout, diffable data source and reusable view components.

Result builders in Swift


If you want to make a result builder in Swift, this article will help you to deal with the most common cases when creating a DSL.

The ultimate Combine framework tutorial in Swift


Get started with the brand new declarative Combine framework in practice using Swift. I'll teach you all the goodies from zero to hero.

Top 20 iOS libraries written in Swift


I gathered the best open source Swift frameworks on github that will help you to speed up mobile application development in 2019.

UIKit init patterns


Learn about the initialization process of the two well known classes in UIKit. Say hello to UIViewcontroller, and UIView init patterns.

Awesome native Xcode extensions


This is the biggest and the best collection of the currently available natively created source editor extensions for Xcode.

Conventions for Xcode


Learn how to organize your codebase. If you are struggling with Xcode project structure, files, naming conventions, read this.

ClockKit complications cheatsheet


ClockKit families and templates, there are so many of them. It's a little bit time consuming if you are looking for the right one.