I have implemented an application which uses PLCrashReporter as Crash handling method. and it retrieves a report which can be switched to human readable format.
Incident Identifier: E125648C-6BCF-4F69-9950-C8CDFB0535D3
CrashReporter Key: e681450ca18f97638adb5f7295a4af24103b92ae
Hardware Model: iPad5,4
Process: CrashReport [6918]
Path: /private/var/mobile/Containers/Bundle/Application/FA6CA909-C229-457F-9EF0-35B889481B63/CrashReport.app/CrashReport
Identifier: net.example.CrashReport
Version: 1 (1.0)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2016-05-15 16:40:51.199 +0430
Launch Time: 2016-05-15 16:40:44.122 +0430
OS Version: iOS 8.4.1 (12H321)
Report Version: 105
Exception Type: EXC_CRASH (SIGTRAP)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 1
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0:
0 CrashReport 0x00000001000663a4 0x100060000 + 25508
1 CrashReport 0x00000001000662ac 0x100060000 + 25260
2 CrashReport 0x0000000100066304 0x100060000 + 25348
3 UIKit 0x0000000187b411e8 0x187afc000 + 283112
with all details about the application and Hardware model , but No Line or class name!
I have searched a lot and find out the i have to use symbolication process.
in final: I need some codes to extract line number and functions from PLCrashReport , please use Swift. I am not very good at Objective C.
Thanks
答案 0 :(得分:2)
您需要对崩溃报告进行符号化,例如:通过使用Xcode使用的相同工具symbolicatecrash.pl
。这里有很多讨论引用这个,以下链接提供了许多答案之一:How to Manually Symbolicate iOS Crash to View Crash Logs
此外,您需要使用导致崩溃的构建创建的确切dSYM,如果没有dSYM,上述工具无法提供任何有用的数据,尤其是无法提供类名,方法名,文件名或行号。每次在Xcode中构建应用程序时都会生成dSYM。它与App Store无关。检查您在哪里找到应用程序包的构建文件夹。如果您没有看到它,则更改了构建设置。以下页面显示了您需要启用的构建设置:https://support.hockeyapp.net/kb/client-integration-ios-mac-os-x-tvos/how-to-solve-symbolication-problems#build-settings-for-getting-proper-symbol-data
无法直接从您的应用程序获取行号,因为二进制文件不会随时提供必要的信息。您需要使用上述工具和上面提到的dSYM来表示崩溃报告以获取行号。
由于无法仅使用您的应用二进制文件获取行号,因此也无法在运行时获取它们。因此,如果你在Swift或Objective-C中编写代码并不重要,那也没关系。