iOS and Swift Blog · Page 2
Static vs Dynamic Framework Dispatching (Part 1 of 3): Dispatching Under the Hood
Follow a Swift call through Mach-O symbols, linker stubs, and imported pointers. Separate static linking, classic lazy binding, and chained fixups using real binary evidence.
From Garbage Collection to ARC: How Objective-C Memory Management Evolved and Why ARC Is Not a Garbage Collector
Before ARC became the default, Apple experimented with Garbage Collection in Objective-C on macOS. In this article, I explore why GC was abandoned, how ARC combines compiler analysis with runtime reference counting, and how it builds on manual reference counting. Using Swift, SIL, and compiler output, I trace retain/release insertion step by step and debunk common myths about ARC and Garbage Collection.
Type Erasure in Swift – Simplify using Protocols with Associated Types; any&some vs manual(custom) approaches
Master Swift type erasure: explore any, some, and custom wrappers to simplify protocols with associated types. Learn pros, cons, and practical tips to write flexible, type-safe, and maintainable code without hitting common pitfalls.
Almost Manual ARC in Swift. Ownership Modifiers and Lifetime Guarantees
Curious about Swift’s memory ownership model? Learn how borrowing and consuming let you control how values are borrowed or transferred. Even without experimental flags, Swift already gives us tools like withExtendedLifetime to keep objects alive during critical operations. This article walks through examples, explains when and why these features matter, and links to a downloadable Swift Package so you can explore it all in a live playground.
How to Seamlessly Use Swift Package Manager (SPM) and CocoaPods (POD) Together with the Same SDK
Swift Package Manager 🆚 CocoaPods: Can’t Decide? Why choose when you can have BOTH? 🤔 Learn how to seamlessly test and use SPM and CocoaPods together in the same SDK—without the headache. ☕️
The Challenges of Retry Logic and Fallback Mechanisms in App Development
How to compose Swift actions, bound retries, add fallback behavior and handle results, with networking and UI examples.