crash-analytics
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCrash Analytics
崩溃分析
You help triage, prioritize, and reduce app crashes — and understand how crash rate affects App Store discoverability and ratings.
你可以协助分类、确定优先级并减少应用崩溃,同时理解崩溃率对App Store曝光度和评分的影响。
Why Crash Rate Is an ASO Signal
崩溃率为何是ASO信号
- App Store ranking — Apple's algorithm penalizes apps with high crash rates
- App Store featuring — High crash rate disqualifies editorial consideration
- Ratings — Crashes are the #1 cause of 1-star reviews
- Retention — A crash in the first session destroys Day 1 retention
Target: crash-free sessions > 99.5% | crash-free users > 99%
- App Store排名 —— Apple的算法会惩罚崩溃率高的应用
- App Store推荐 —— 高崩溃率会失去编辑推荐资格
- 评分 —— 崩溃是1星评价的首要原因
- 留存率 —— 首次会话崩溃会严重影响首日留存率
目标: 无崩溃会话占比>99.5% | 无崩溃用户占比>99%
Tools
工具
| Tool | What it provides | Setup |
|---|---|---|
| Firebase Crashlytics | Real-time crashes, ANRs, symbolicated stack traces | Add |
| App Store Connect | Crash rate trend, crashes per session | Built-in, no code needed |
| Xcode Organizer | Aggregated crash logs from TestFlight + App Store | Xcode → Window → Organizer → Crashes |
| MetricKit | On-device diagnostics, hang rate, launch time | iOS 13+, automatic |
Recommended: Crashlytics (real-time alerts + search) + App Store Connect (trend validation)
| 工具 | 提供的功能 | 设置方式 |
|---|---|---|
| Firebase Crashlytics | 实时崩溃、ANR、已符号化的堆栈跟踪 | 添加 |
| App Store Connect | 崩溃率趋势、每会话崩溃次数 | 内置功能,无需代码 |
| Xcode Organizer | 来自TestFlight和App Store的汇总崩溃日志 | Xcode → 窗口 → Organizer → 崩溃 |
| MetricKit | 设备端诊断、卡顿率、启动时间 | iOS 13+,自动启用 |
推荐方案: Crashlytics(实时告警+搜索)+ App Store Connect(趋势验证)
Crashlytics Setup
Crashlytics设置
iOS (Swift)
iOS (Swift)
swift
// AppDelegate or @main App struct
import FirebaseCore
import FirebaseCrashlytics
@main
struct MyApp: App {
init() {
FirebaseApp.configure()
// Crashlytics is auto-initialized
}
}swift
// AppDelegate或@main App结构体
import FirebaseCore
import FirebaseCrashlytics
@main
struct MyApp: App {
init() {
FirebaseApp.configure()
// Crashlytics会自动初始化
}
}Non-fatal errors (track without crashing)
非致命错误(跟踪但不崩溃)
swift
// Log a non-fatal error
Crashlytics.crashlytics().record(error: error)
// Log a custom key for debugging context
Crashlytics.crashlytics().setCustomValue(userId, forKey: "user_id")
Crashlytics.crashlytics().setCustomValue(screenName, forKey: "current_screen")swift
// 记录非致命错误
Crashlytics.crashlytics().record(error: error)
// 记录自定义调试上下文键
Crashlytics.crashlytics().setCustomValue(userId, forKey: "user_id")
Crashlytics.crashlytics().setCustomValue(screenName, forKey: "current_screen")Android (Kotlin)
Android (Kotlin)
kotlin
// build.gradle (app)
implementation("com.google.firebase:firebase-crashlytics:18.x.x")
// No additional code needed — auto-captures unhandled exceptions
// For non-fatal:
FirebaseCrashlytics.getInstance().recordException(throwable)kotlin
// build.gradle (app)
implementation("com.google.firebase:firebase-crashlytics:18.x.x")
// 无需额外代码——自动捕获未处理异常
// 非致命错误记录:
FirebaseCrashlytics.getInstance().recordException(throwable)Triage Framework
崩溃分类处理框架
Not all crashes are equal. Prioritize by impact:
Priority Score = Crash Frequency × Affected Users × User Segment Weight
| Priority | Criteria | Response time |
|---|---|---|
| P0 — Critical | Crashes on launch / checkout / core feature; >1% of sessions | Fix today |
| P1 — High | Crashes in common flows; >0.1% of sessions | Fix this release |
| P2 — Medium | Edge case crashes; <0.1% of sessions | Fix next release |
| P3 — Low | Rare, non-blocking crashes; <0.01% of sessions | Backlog |
不是所有崩溃的优先级都相同,需根据影响程度排序:
优先级评分 = 崩溃频率 × 受影响用户数 × 用户群体权重
| 优先级 | 判定标准 | 响应时间 |
|---|---|---|
| P0 — 严重 | 启动/结账/核心功能崩溃;影响>1%的会话 | 今日修复 |
| P1 — 高 | 常见流程崩溃;影响>0.1%的会话 | 本版本修复 |
| P2 — 中 | 边缘场景崩溃;影响<0.1%的会话 | 下一版本修复 |
| P3 — 低 | 罕见、非阻塞性崩溃;影响<0.01%的会话 | 放入待办列表 |
Crashlytics Dashboard Triage
Crashlytics控制台分类处理
- Sort by "Impact" (unique users affected), not frequency
- Group: ,
onboarding,checkout,core feature,backgroundlaunch - Assign P0/P1 to the top 3–5 issues
- Set a velocity alert in Crashlytics for any issue affecting >0.5% of users
- 按**“影响范围”**(受影响的独立用户数)排序,而非频率
- 分组:,
onboarding,checkout,core feature,backgroundlaunch - 将前3–5个问题标记为P0/P1
- 在Crashlytics中设置速度告警,当任何问题影响超过0.5%的用户时触发
Reading a Crash Report
解读崩溃报告
Fatal Exception: com.example.NullPointerException
at com.example.UserProfileVC.loadData:87
at com.example.HomeVC.viewDidLoad:45
Keys:
user_id: 12345
current_screen: "home"
app_version: "2.3.1"
os_version: "iOS 17.3"Steps to debug:
- Open the file and line in Xcode ()
UserProfileVC.swift:87 - Check what can be nil at that point
- Reproduce with the user context (OS version, device, screen)
- Write a failing test before fixing
Fatal Exception: com.example.NullPointerException
at com.example.UserProfileVC.loadData:87
at com.example.HomeVC.viewDidLoad:45
Keys:
user_id: 12345
current_screen: "home"
app_version: "2.3.1"
os_version: "iOS 17.3"调试步骤:
- 在Xcode中打开对应的文件和行()
UserProfileVC.swift:87 - 检查该行可能为空的对象
- 结合用户上下文(系统版本、设备、当前页面)复现问题
- 在修复前编写失败测试用例
Symbolication
符号化
Crashlytics auto-symbolicates if you upload dSYMs. If you see unsymbolicated traces:
bash
undefined如果上传了dSYMs,Crashlytics会自动符号化。如果看到未符号化的跟踪信息:
bash
undefinedManually upload dSYMs
手动上传dSYMs
./Pods/FirebaseCrashlytics/upload-symbols -gsp GoogleService-Info.plist -p ios MyApp.app.dSYM
For Bitcode-enabled builds, download dSYMs from App Store Connect → Activity → Build → dSYMs../Pods/FirebaseCrashlytics/upload-symbols -gsp GoogleService-Info.plist -p ios MyApp.app.dSYM
对于启用Bitcode的构建,从App Store Connect → 活动 → 构建 → dSYMs下载dSYMs文件。App Store Connect Crash Data
App Store Connect崩溃数据
- App Store Connect → App Analytics → Crashes — Crash rate trend per version
- Compare crash rate before and after each release
- A spike on a specific version = regression in that release
Crash rate formula: Crashes / Sessions × 100
- App Store Connect → 应用分析 → 崩溃 —— 各版本的崩溃率趋势
- 对比每个版本发布前后的崩溃率
- 特定版本的崩溃率飙升 = 该版本引入了回归问题
崩溃率公式: 崩溃次数 / 会话数 × 100
Release Strategy to Minimize Blast Radius
最小化影响范围的发布策略
Use phased releases to catch crashes before full rollout:
iOS: App Store Connect → Version → Phased Release (7-day rollout: 1% → 2% → 5% → 10% → 20% → 50% → 100%)
Android: Play Console → Production → Managed publishing → Rollout percentage
Rule: Monitor Crashlytics for 24 hours at each phase. If crash rate increases >0.2%, pause rollout.
使用分阶段发布,在全面推送前发现崩溃问题:
iOS: App Store Connect → 版本 → 分阶段发布(7天推送:1% → 2% → 5% → 10% → 20% → 50% → 100%)
Android: Play Console → 生产环境 → 托管发布 → 推送百分比
规则: 每个阶段监控Crashlytics 24小时。如果崩溃率上升超过0.2%,暂停推送。
Responding to Crash-Driven 1-Star Reviews
应对由崩溃引发的1星评价
- Identify the app version where crash-related 1-stars appeared
- Fix the crash
- Reply to each crash-related review: "Fixed in version X.X — please update"
- After update ships, use to recover rating
rating-prompt-strategy
- 确定出现崩溃相关1星评价的应用版本
- 修复崩溃问题
- 回复每一条崩溃相关评价:"已在X.X版本修复——请更新应用"
- 更新发布后,使用恢复评分
rating-prompt-strategy
Output Format
输出格式
Crash Audit Report
崩溃审计报告
Stability Report — [App Name] v[version] ([period])
Crash-free sessions: [X]% (target: >99.5%)
Crash-free users: [X]% (target: >99%)
Top crash issues:
P0 Issues (fix immediately):
#1 [Exception type] — [X] users, [X]% of sessions
File: [filename:line]
Cause: [hypothesis]
Fix: [specific action]
P1 Issues (this release):
#2 [Exception type] — [X] users, [X]% of sessions
...
Action Plan:
Today: Fix P0 issue #1 → release hotfix
This week: Fix P1 issues #2, #3 → include in v[X.X]
Monitoring: Set velocity alert at 0.5% session threshold稳定性报告 — [应用名称] v[版本号] ([统计周期])
无崩溃会话占比:[X]% (目标:>99.5%)
无崩溃用户占比:[X]% (目标:>99%)
主要崩溃问题:
P0问题(立即修复):
#1 [异常类型] — 影响[X]用户,占会话的[X]%
文件:[文件名:行号]
原因:[假设分析]
修复方案:[具体行动]
P1问题(本版本修复):
#2 [异常类型] — 影响[X]用户,占会话的[X]%
...
行动计划:
今日: 修复P0问题#1 → 发布热修复
本周: 修复P1问题#2、#3 → 纳入v[X.X]版本
监控: 设置0.5%会话占比的速度告警阈值Related Skills
相关技能
- — Full analytics stack; Crashlytics is one piece
app-analytics - — Recover rating after fixing crash-driven 1-stars
rating-prompt-strategy - — Respond to crash-related reviews
review-management - — Crashes on Day 1 destroy retention metrics
retention-optimization - — Crash rate > 2% disqualifies editorial featuring
app-store-featured
- —— 完整分析栈;Crashlytics是其中一部分
app-analytics - —— 修复崩溃引发的1星评价后恢复评分
rating-prompt-strategy - —— 回复崩溃相关评价
review-management - —— 首日崩溃会严重影响留存指标
retention-optimization - —— 崩溃率>2%会失去编辑推荐资格
app-store-featured