iOS设备崩溃日志获取与查看
2026年2月28日 17:14
1)如何从 iPhone 获取崩溃日志
路径:设置 → 隐私与安全性 → 分析与改进 → 分析数据
这里的崩溃日志通常是 .ips 文件。
.ips 原始内容示例(节选):
{"app_name":"hello","timestamp":"2026-02-28 15:05:24.00 +0800","app_version":"1.0","bundleID":"com.example.hello","bug_type":"309","os_version":"iPhone OS 26.3 (23D127)","incident_id":"2B7A2F77-7F64-42DA-A184-AA496AD61AAC"}
{
"modelCode" : "iPhone18,3",
"captureTime" : "2026-02-28 15:05:24.5689 +0800",
"procName" : "hello",
"bundleInfo" : {"CFBundleShortVersionString":"1.0","CFBundleVersion":"1","CFBundleIdentifier":"com.example.hello"}
}
2)如何将 .ips 转成可查看的崩溃日志
把 .ips 文件复制到 Mac(如桌面),直接双击。
系统会用 控制台(Console) 打开,并自动转成可读格式(Translated Report)。
转换后示例(节选):
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Incident Identifier: 2B7A2F77-7F64-42DA-A184-AA496AD61AAC
Process: hello [1056]
Identifier: com.example.hello
Version: 1.0 (1)
OS Version: iPhone OS 26.3 (23D127)
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Triggered by Thread: 0
Thread 0 Crashed:
0 libswiftCore.dylib _assertionFailure(...)
1 hello.debug.dylib ViewController.click(_:)
说明:这是一个 Demo 在真机调试运行时产生的崩溃日志,符号信息完整,不需要额外 dSYM 符号化也能直接看到具体崩溃代码位置(如
ViewController.click(_:))。