Category: Objective-C

Objective-C
Strong, Weak, Assign: The Essential Difference

By Seren  |  05 Jul, 2026
Leave a comment

Every iOS developer knows how to use property modifiers. But fewer can explain why assign causes dangling pointers or how weak automatically sets itself to nil. This article skips the surface-level usage and looks at the underlying implementation — and I’ll share a real crash story that cost me an afternoon of debugging. Reference Counting […]

Objective-C
Runtime Dynamic Method Addition and Method Swizzling in Practice: From Principles to Black Magic

By Seren  |  03 Jul, 2026
Leave a comment

Method Swizzling lets you replace a method implementation at runtime without touching the original source code — a technique that powers debugging tools, analytics, and AOP patterns across the iOS ecosystem. Then one day I saw a colleague using Runtime to dynamically add methods, solving a problem where “some methods are only needed in specific […]

Objective-C
ARC Automatic Memory Management: Core Decision Logic

By Seren  |  01 Jul, 2026
Leave a comment

ARC automates memory management in Objective-C, but understanding the compiler decision logic — when it inserts retain, release, and autorelease — is essential for debugging subtle memory issues.” Then I ran into a weird crash — an object with a weak reference had already been deallocated. That’s when I realized ARC’s decision logic was far […]

Objective-C
Block Underlying Structure and Variable Capture Explained

By Seren  |  27 Jun, 2026
1 Comment

A Block in Objective-C is more than a closure — it is a full C struct with specific memory layout rules that determine how variables are captured and when the Block is deallocated.” Later I ran into retain cycles, wondered what __block actually did, and why local variables couldn’t be modified. That’s when I realized […]