Tencent Music Tech Team
Dec 22, 2023 · Mobile Development
Root Cause Analysis of iOS Crash Caused by Method Swizzle on NSString
The app crashed on launch because a third‑party SDK swizzled NSString’s stringByAppendingString: with a method whose name conflicted with the app’s own swizzle, causing recursive calls through the __NSCFString class‑cluster and a stack overflow; renaming the methods with a unique prefix and excluding __NSCFString from swizzling resolves the issue.
Class ClusterCrash DebuggingMethod Swizzle
0 likes · 11 min read