You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何定位Apple应用崩溃原因——TestFlight测试崩溃日志排查求助

iOS App Crash: EXC_CRASH (SIGABRT) from Unrecognized Selector

Let’s start by breaking down your crash log—this is a classic unrecognized selector sent to an object crash, as shown by the -[NSObject(NSObject) doesNotRecognizeSelector:] line in the backtrace. The crash triggers when a user interacts with a UIControl (like a button or switch) because the system tries to send an action message to a target that can’t handle it.

Here’s a step-by-step breakdown of how to track this down:

  • Pinpoint the problematic UI control
    The call chain starts with -[UIApplication sendAction:to:from:forEvent:], which means a target-action binding is broken. Check:

    • All buttons, switches, or other UIControl subclasses you’ve modified recently—both those set up in code and in Storyboards/XIBs.
    • For Storyboard/XIB bindings, double-check the method name spelling and parameters (e.g., make sure your @IBAction has the correct signature like @IBAction func handleTap(_ sender: UIButton) instead of a missing parameter or typo).
  • Verify target object lifecycle
    Even though Zombies didn’t pick up issues, confirm:

    • The target object for the action isn’t deallocated before the user taps the control. For example, if you pop a ViewController but leave its bound control on screen, tapping it will send a message to a deallocated instance (though Zombies usually catches this, it’s worth ruling out).
    • Any dynamically created controls or code using performSelector/KVC—these can accidentally reference non-existent methods.
  • Fully symbolize your crash log
    Your current log shows system framework symbols, but getting fully symbolized logs will reveal the exact method your app tried to call. Use Xcode’s Organizer to import the crash log, and make sure you have the matching dSYM file for the TestFlight build—this will map memory addresses to your actual code.

  • Add an Objective-C exception breakpoint
    This is the fastest way to catch the crash in action:

    1. Open the Breakpoint Navigator (Cmd+8).
    2. Click the "+" button in the bottom left and select "Exception Breakpoint...".
    3. Set it to break On Throw. When the crash happens, Xcode will stop at the exact line where the unrecognized selector is sent, showing you the target object and the selector name.
  • Check Swift-Objective-C interop issues
    If your project mixes Swift and Objective-C:

    • Ensure any Swift method used as an action has the @objc modifier—without it, the Objective-C runtime can’t see the method.
    • Confirm the Objective-C name mapping is correct. For example, a Swift method func buttonTapped(_ sender: UIButton) becomes buttonTapped: in Objective-C; a typo here (like buttonTap) will cause the crash.

You’ve already done great by using Zombies and checking Apple’s docs—focus on the exception breakpoint and symbolizing the log, as these will give you the concrete details you need to fix this.

内容的提问来源于stack exchange,提问作者amydowse

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.28 23:42:42