Author: Seren

A developer exploring iOS, Objective-C, Swift, and other tech stacks. Here to document my learning process, pitfalls, and growing journey across new technologies.

Objective-C
Zombie Object Debugging Principle and Usage Skills

By Seren  |  15 Aug, 2026
Leave a comment

EXC_BAD_ACCESS crashes are among the most frustrating errors in iOS development. You see a memory address, no stack trace, no hints — just a blank console staring back at you. Later I learned that this crash is usually caused by accessing a deallocated object — a “dangling pointer” problem. And Xcode’s “Zombie Objects” debugging tool […]

Objective-C
MRC and ARC Mixed Compilation Adaptation Rules

By Seren  |  13 Aug, 2026
Leave a comment

Mixing ARC and MRC in a single Xcode project sounds like a recipe for disaster, but sometimes it is the only option when inheriting legacy codebases or integrating third-party libraries. Later, when I inherited a legacy project, I discovered it contained a bunch of MRC third-party libraries, and compilation immediately failed. After researching, I learned […]

Objective-C
Stack Block, Heap Block, Global Block Lifecycle Management

By Seren  |  10 Aug, 2026
Leave a comment

Blocks in Objective-C come in three distinct flavors — Global, Stack, and Heap — each with its own lifecycle rules and memory behavior that most developers never consciously think about. It wasn’t until I encountered a wild pointer crash under MRC that I realized Blocks have three different forms in memory: Global Blocks, Stack Blocks, […]

Objective-C
Object Property Default Initialization Rules Explained

By Seren  |  07 Jul, 2026
Leave a comment

When an Objective-C object is allocated but not yet initialized, its properties default to zero — a behavior rooted in how calloc works, not in any runtime magic. I was nervous — would this crash? It didn’t. The count returned 0. Later I realized this wasn’t luck — it’s because the Objective-C runtime zeroes everything […]

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 […]

Swift
Swift Retain Cycles: Three Solutions and When to Use Each

By Seren  |  29 Jun, 2026
2 Comments

Retain cycles are the most common cause of memory leaks in Swift, and they are easy to create accidentally — a closure capturing self, a delegate held strongly, a notification center retaining an observer. I traced it back to a closure retain cycle—the view controller held a closure, and the closure captured self. Both objects […]

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 […]

Swift
static vs class in Swift: When Type Methods Can (and Can’t) Be Overridden

By Seren  |  21 May, 2026
Leave a comment

I got a compiler error in the middle of a code review that I didn’t understand at first: “overriding declaration requires an ‘override’ keyword.” My subclass was trying to override a static method — but Swift wouldn’t let me. That’s when I realized static and class aren’t interchangeable; they have different meanings for inheritance and […]