• Home
  • Author

Swift & Small Pieces

ARTICLES ABOUT SWIFT , OBJECTIVE-C, ALGORITHMS and Cryptography BY THOMAS KAUSCH

Get in Contact

Menu Close
  • Home
  • Author

Fast Queue implementation for SWIFT

January 26, 2022tomkausch Leave a Comment

The Swift Standard Library currently implements the three most essential general-purpose data structures: Array, Set and Dictionary. These are the right tool for a wide variety of use cases, and they are particularly well-suited for use as currency types. But sometimes, in order to… Continue Reading →

Algorithms, Code Blocks, iOS, Swift, Uncategorized

Why protocols can only be used as generic constraints when they have Self or an associated type requirement.

January 26, 2022tomkausch Leave a Comment

Protocols with associated types are a powerful, if somewhat treacherous, feature of Swift. Sometimes it’s fair to say that the only winning move is not to play it. As an example here is a recursive protocol of binary tree node… Continue Reading →

Uncategorized

Producer-Consumer Problem with GCD and Sempaphors using Swift (Part 1)

January 2, 2022tomkausch Leave a Comment

The producer–consumer problem also known as the bounded-buffer problem is a classic example of a multi-process synchronisation problem. It is defined as follows: The Producer generates items in random time intervals and writes them into a bounded buffer. The Consumer consumes these items… Continue Reading →

Algorithms, Code Blocks, Concurrency, Swift concurrency, swift

Latest Swift running with Docker

December 17, 2021tomkausch Leave a Comment

Swift is a programming language that is designed to work with Apple’s ecosystem. However, it can run on Linux. It is not just written for Apple products. If you do not have Mac hardware or you do not want to… Continue Reading →

Dev Tools, Swift Swift5.5

Explore Frameworks and Packages with Playgrounds

August 29, 2021tomkausch Leave a Comment

Xcode Playgrounds help developers explore Swift language and Apple framework APIs and provide a scratchpad for experimentation. Since Xcode 12 playgrounds have been integrated with the new build system and can also used with Frameworks and Package dependencies. As long… Continue Reading →

Swift, XCode

Solving a simple code puzzle in Swift

June 16, 2021tomkausch Leave a Comment

Georgina loves making up weird sequences. Here is her latest: “1 2 4 8 10 20 22 44 46 92 94 188 190 380…” Write a program that finds the sum of the first 150 numbers in Georgina’s series. There… Continue Reading →

Algorithms, Languages swift

Types and meta type in Swift

April 11, 2021tomkausch Leave a Comment

Knowing the type and meta-type in Swift is not as common as in Smalltalk or Objective-C. Where in objective-c, you can instantiate an object out of a class name or modify classes at runtime this is not possible in Swift.… Continue Reading →

iOS, Languages, Swift Meta Type, Self versus self, swift, Type

How to handle iOS massive ViewController syndrome?

March 15, 2021tomkausch

The Cocoa frameworks and the Model-View-Controller pattern go hand in hand. A typical iOS application, for example, is composed of models, views, and view controllers. The model and view layers are glued together by the controllers of the application. Those… Continue Reading →

iOS, Swift Data Source, Design, Patterns, UIViewController

Encoding & Decoding dates in Swift

March 13, 2021tomkausch Leave a Comment

In this article, you’ll learn all about encoding and decoding Dates in Swift to JSON, exploring the basics and advanced topics like custom dates and custom encoding. Overview Many programming tasks involve sending data over a network connection, saving data… Continue Reading →

Encoding & Decoding Date, Swift Date, Decode, Encode, ISO-8601

iOS Jailbreak detection is useless

March 10, 2021tomkausch Leave a Comment

When developing financial apps you probably get the requirement to detect jailbroken devices. The reason for detection is to either disable some or most of the app’s functionalities due to security concerns that come from a jailbroken system. This article… Continue Reading →

iOS, Security, Uncategorized

Post navigation

← Older Articles
Newer Articles →

Thomas Kausch

Recent Posts

  • Swift 6 & Foundation
  • How to Use VSCodium for Swift Development with Continue AI
  • Use MLX LM for large language models on Apple silicon with MLX
  • Download .ipa Files from iOS AppStore
  • What is an actor model?

Recent Comments

    Categories

    Algorithms Augmented Reality Code Blocks Concurrency Dev Tools Effective Objective-C Encoding & Decoding Date iOS Languages Objective-C Pyhthon Security Swift Uncategorized Virtual Reality XCode
    © 2025 Swift & Small Pieces. All rights reserved.
    Fashionista by aThemes