Wesley de Groot's Blog
Tag: Swift

With tag: Swift

Generics in Swift

Swift, offers a powerful feature called generics that greatly enhances code reusability, efficiency, and safety. In this blog post, we will dive deep into generics and explore how the

Variadic Parameters

These versatile constructs allow us to handle a variable number of arguments of the same type within a function.

What are Variadic Parameters?

In Swift, variadic parameters enable a fu

If case let

This concise syntax provides a convenient shortcut when you want to match a single case without writing a full-blown `switch` statement. Although it might seem a bit backward at first, once you grasp its

self, Self, and Self.self in Swift

Let's dive into the fascinating world of `self`, `Self`, and `Self.self` in Swift. These seemingly similar constructs have distinct meanings and use cases.

What is `self

ExpressibleByStringLiteral URL

The ExpressibleByStringLiteral protocol is a powerful feature in Swift that allows us to create custom types directly from string literals. Essentially, i

Subscripts in Swift

Subscripts provide a convenient way to access the elements of a collection, list, or sequence directly by index. Whether you’re dealing with arrays, dictionaries, or custom types, subscripts al

Default values for UserDefaults

UserDefaults (NSUserDefaults) is a go-to database for saving users' preferences over application behavior.

What is UserDefaults?

UserDefaults is a simple key-


Let's delve into the fascinating world of TipKit, a powerful framework that empowers developers to create and customize app tips.
Whether you're aiming to introduce new features, reveal hidden f

Localizing In Xcode

Localizing and Varying Text with a String Catalog

Your app's success hinges on delivering an exceptional experience to users across different locales. Localization is

Translating closures to async

In this post, we will discuss how to translate closures to async in Swift.

What is continuation?

In Swift, a continuation is a construct that allows you to suspend and resu

Aurora Editor

Aurora Editor: A Swift-Powered IDE for Efficient Coding


As developers, we're always on the lookout for tools that enhance our productivity, streamline our workf


Today i write about my Swift package .
It's a simple networking library for Swift it is a wrapper around URLS


Let's delve into the fascinating world of Swift's `@dynamicMemberLookup`. This attribute, introduced in Swift 4.2, provides a powerful mechanism for accessing properties and

Implementing Admob in SwiftUI

Recently i was working on a that required me to implement Admob in a SwiftUI app.

I encountered some issues while implementing Admob

OTP Code Generation with CryptoKit: A Swift Approach


In the realm of secure authentication, One-Time Passwords (OTPs) play a crucial role. Whether it's two-factor authenticat

Snippet: @EnvironmentVariable

If you are creating commandline apps you sometimes need to acces the operating system environment variables, while you can use getenv(name) it can co

Observable Geocoder

Firstly we want to import CoreLocation for the location services.

We're going to construct a basic class, which subclasses ObservableObject.

class Geocoder: ObservableOb

Easy Publishers

Ever wondered how to create a simple publisher?

In this blog i'll try to show you the basics

Firstly we need to import the required frameworks

// Used for the ObservableObject
x-twitter mastodon github linkedin discord threads instagram whatsapp bluesky square-rss sitemap