RSSAmplifier

Blog

Artur Gruchała

iOS and Swift knowledge base

arturgruchala.comRSS feed ↗15 posts

Latest posts

Assembler for Swift developers - part 2

You’ve mastered “Hello, Assembly!” and peeked inside registers. Now let’s plunge into pointers, arrays, function calls, iteration, and memory regions. You’ll learn how ARM64 turns high-level constructs into pointer arithmetic, branches, and stack frames—and why overstepping your allocated buffer

Assembler for Swift developers

Ever wondered what really happens under the hood when you build that shiny Swift app? Here’s a confession: I used to treat assembly like dark magic—until I decided to embrace it. In this first installment of our three-part series, we’ll cover the bare

Swift and C++ interoperability in practice

Swift’s new C++ interoperability is a game-changer, letting you tap into mature C++ libraries from Swift’s safe, expressive syntax. In this post, I’ll guide you through the language-pair preview introduced in Swift 5.9—showing how to call C++ functions, wrap

Swift 6.2 Java interoperability in practice

If you’ve ever tried straddling two worlds—one foot in the elegant, type-safe realm of Swift and the other in the sprawling ecosystem of Java—you know the pain of keeping them in sync. Swift 6.2 introduces a first-class Swift–Java interoperability

Safer Swift: How ~Copyable Prevents Hidden Bugs

Swift 5.9 introduced the new  ~Copyable  protocol, which makes an entity "non-copyable." By default, Swift automatically adds the  Copyable  protocol to all types—without it, value types wouldn't work! This implicit conformance simplifies our day-to-day work, allowing

Power of Swift Macros

As iOS devs, sometimes We have to write repeatable code. This tedious task is very boring, error-prone, and unsatisfying. Instead of falling into despair we can elevate our experience with Swift Macros! We will create a macro which will automate creating SwiftUI representation to a UIKit view! For the

Stay Connected: Mastering iOS Communication Notifications

In today’s interconnected world, timely and relevant communication is the cornerstone of user engagement in mobile applications. iOS developers have a sophisticated tool at their disposal: communication notifications, designed specifically for chat and other user-to-user interactions. These notifications not only inform users of new messages but

Testing network calls using URLProtocol

Testing network calls is a critical aspect of ensuring the reliability and stability of your iOS applications. We'll explore how to effectively test network calls in Swift using the URLProtocol API. With this guide, you will have powerful tools to ensure code quality. Setup We will use a

Unit conversion is easy in Swift

Foundation framework has many useful implementations, that can make our life easier. One of them is Unit and Measurement APIs. Unit and Measurement Measurment is a struct that holds the value of the given Unit . Additionally, it can convert, add, subtract, and do other arithmetical operations on this value. The

The Lost Art of Makefile: A Guide for iOS Developers

In the world of iOS development, we often find ourselves relying on Xcode and Swift for most of our tasks. However, there's a powerful tool that's been around for decades and can greatly simplify our development process: the Makefile. A Makefile is a file containing a

Deprecation of rbenv on Bitrise: Switching to asdf

Bitrise, the Continuous Integration and Delivery (CI/CD) Platform, has recently deprecated the use of rbenv . This means that rbenv will no longer receive updates and support. But don't worry, there's a new tool in town - asdf ! This blog post will guide you through the process

Mastering SwiftUI Shadow Loaders: Making Implementation a Breeze

Shadow loaders are becoming increasingly popular as a UI/UX feature in mobile apps. They replace traditional "spinners" with a more elegant solution. By filling the entire screen with a "skeleton" layout, the app can later inflate views after fetching data. Implementation I made an assumption

Streamlining JSON Encoding and Decoding in Swift with Property Wrappers

As iOS developers, we frequently interact with various public and private REST APIs, some of which are reliable and well-established, while others may not be as reliable. In certain scenarios, we cannot guarantee that the received model will precisely match the expected type. Some APIs may return different types

From Cocoapods to SPM: Automate Versioning with Fastlane's New Action

If you are a Cocapods framework maintainer or SPM library creator this article is for you! Switching from Cocoapods to Swift Package Manager is inevitable, more and more third-party solutions are making such a switch. Some of us use Fastlane to automate testing, building, and releasing our work. When

Awesome Lightweight Asynchronous Process Handling Made Easy in Swift

In this blog post, we'll explore an awesome Swift code snippet that demonstrates a lightweight and easy-to-use asynchronous process handler. By leveraging async/await and the Foundation framework, this code enables you to execute processes asynchronously and retrieve their output data effortlessly. Let's dive