Tag

Delegate Proxy

0 views collected around this technical thread.

ByteDance Dali Intelligent Technology Team
ByteDance Dali Intelligent Technology Team
Jun 19, 2021 · Mobile Development

Hooking iOS UICollectionView Delegate with Method Swizzling and NSProxy: Challenges and Solutions

This article explains how to use AOP techniques such as Method Swizzle and NSProxy to hook UICollectionView and UIViewController delegate methods for precise event tracking, analyzes compatibility problems caused by multiple delegate proxies in large apps, and proposes three practical solutions to avoid crashes and maintain extensibility.

Delegate ProxyHookingMethod Swizzling
0 likes · 15 min read
Hooking iOS UICollectionView Delegate with Method Swizzling and NSProxy: Challenges and Solutions
ByteDance Terminal Technology
ByteDance Terminal Technology
May 28, 2021 · Mobile Development

Hooking iOS Delegates with Method Swizzling and Proxy Patterns: Challenges, Crash Analysis, and Compatibility Solutions

This article explores using AOP techniques such as Method Swizzle and NSProxy‑based delegate proxies to instrument iOS view controllers and collection view delegates, analyzes crashes caused by multiple setDelegate hooks—including interactions with RxCocoa—and proposes several practical solutions to ensure stable hooking in complex app environments.

Delegate ProxyHookingMethod Swizzling
0 likes · 17 min read
Hooking iOS Delegates with Method Swizzling and Proxy Patterns: Challenges, Crash Analysis, and Compatibility Solutions