Tibor Bödecs

Tibor Bödecs

Server side Swift enthusiast, book author, content creator.


140 posts

· 5 min read

Hummingbird routing and requests


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

· 5 min read

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.

· 2 min read

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.

· 3 min read

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.

· 4 min read

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.

· 7 min read

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.

· 2 min read

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.

· 2 min read

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.

· 5 min read

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.

· 5 min read

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.

· 4 min read

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.

· 9 min read

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.

· 3 min read

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.

· 7 min read

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.

· 4 min read

Async HTTP API clients in Swift


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

· 4 min read

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.

· 7 min read

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.

· 4 min read

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.

· 5 min read

UIKit - loadView vs viewDidLoad


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

· 8 min read

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.

· 12 min read

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.

iOS
· 4 min read

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.

· 5 min read

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.

· 5 min read

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.

· 4 min read

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.

· 6 min read

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.

· 9 min read

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.

· 6 min read

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.

· 5 min read

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.

· 9 min read

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.

· 9 min read

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.

· 7 min read

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.

· 5 min read

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.

· 7 min read

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.

· 8 min read

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.

· 9 min read

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.

· 8 min read

Unsafe memory pointers in Swift


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

· 8 min read

Memory layout in Swift


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

· 6 min read

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.

· 8 min read

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.

· 6 min read

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.

· 2 min read

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.

· 5 min read

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.

· 5 min read

AJAX calls using Vapor 4


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

· 6 min read

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.

· 5 min read

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.

· 9 min read

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.

· 5 min read

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.

· 6 min read

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.

· 6 min read

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.

· 8 min read

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.

· 5 min read

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.

· 2 min read

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.

· 5 min read

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.

· 13 min read

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.

· 4 min read

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.

· 5 min read

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.

· 11 min read

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.

· 7 min read

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.

· 8 min read

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.

· 4 min read

Modules and hooks in Swift


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

· 16 min read

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.

· 10 min read

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.

· 3 min read

The anatomy of Vapor commands


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

· 4 min read

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.

· 5 min read

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.

· 15 min read

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.

· 2 min read

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.

· 9 min read

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.

· 12 min read

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.

· 18 min read

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.

· 13 min read

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.

iOS
· 4 min read

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.

· 4 min read

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.

· 7 min read

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.

· 10 min read

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.

· 4 min read

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.

· 4 min read

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.

· 6 min read

Swift init patterns


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

· 4 min read

URLSession and the Combine framework


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

iOS
· 7 min read

Promises in Swift for beginners


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

· 5 min read

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.

· 1 min read

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.

· 4 min read

Mastering the VIPER architecture


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

· 8 min read

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.

· 5 min read

Styling by subclassing


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

· 9 min read

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.

· 5 min read

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.

· 7 min read

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.

· 6 min read

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.

· 4 min read

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.

· 1 min read

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.

· 10 min read

UITableView tutorial in Swift


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

· 3 min read

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.

· 5 min read

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.

· 1 min read

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.

· 4 min read

Iterator design pattern in Swift


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

· 6 min read

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.

· 2 min read

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.

· 5 min read

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.

· 11 min read

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.

· 1 min read

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.

· 1 min read

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.

· 5 min read

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.

· 1 min read

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.

· 1 min read

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.

· 1 min read

Comparing factory design patterns


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

· 1 min read

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!

· 1 min read

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!

· 1 min read

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.

· 2 min read

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.

· 3 min read

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.

· 4 min read

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.

· 3 min read

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.

iOS
· 6 min read

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.

· 5 min read

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.

· 12 min read

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.

· 9 min read

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.

· 3 min read

Networking examples for appleOS


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

· 1 min read

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.

· 11 min read

Deep dive into Swift frameworks


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

· 3 min read

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.

· 4 min read

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.

· 3 min read

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.

· 5 min read

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.

· 6 min read

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.

· 2 min read

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.

· 2 min read

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.

· 1 min read

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.

· 2 min read

UIKit init patterns


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

· 2 min read

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.

· 7 min read

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.

· 12 min read

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.

· 6 min read

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.

· 6 min read

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.

· 13 min read

Asynchronous validation for Vapor


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

· 1 min read

Awesome native Xcode extensions


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

· 4 min read

Conventions for Xcode


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

· 1 min read

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.