2

i'm new of using PLCrashReport and i whant to make symbolication client side. I khnow that there is many disadvantages but i want to try it, can you help me please.

I used the last version of CrashReporter and this what i done in the appDelegate class refering to this example http://plcrashreporter.googlecode.com/svn/tags/plcrashreporter-1.1-rc1/Documentation/API/example_usage_iphone.html.

The is a topic that talk about this here PLCrashReporter - How to symbolicate crash data in-process?

Link to the library: https://www.plcrashreporter.org/.

(void) applicationDidFinishLaunching: (UIApplication *) application {
    PLCrashReporter *crashReporter = [PLCrashReporter sharedReporter];
    NSError *error;

    if ([crashReporter hasPendingCrashReport])
        [self handleCrashReport];

    if (![crashReporter enableCrashReporterAndReturnError: &error])
        NSLog(@"Warning: Could not enable crash reporter: %@", error);
Community
  • 1
  • 1
Mohamed Ghebaji
  • 179
  • 2
  • 11

1 Answers1

4

You are linking to an old repository and documentation. The website of PLCrashReporter is https://www.plcrashreporter.org/ and the documentation is https://www.plcrashreporter.org/documentation/api/v1.2/

To enable client side symbolication you need to initialize it with a configuration like this:

  PLCrashReporterSignalHandlerType signalHandlerType = PLCrashReporterSignalHandlerTypeBSD;
  PLCrashReporterSymbolicationStrategy symbolicationStrategy = PLCrashReporterSymbolicationStrategyNone;
  PLCrashReporterConfig *config = [[PLCrashReporterConfig alloc] initWithSignalHandlerType: signalHandlerType
                                                                           symbolicationStrategy: symbolicationStrategy];
  PLCrashReporter *crashReporter  = [[PLCrashReporter alloc] initWithConfiguration: config];

This is based on the latest version 1.2 available on the download page: https://www.plcrashreporter.org/download

But you are right, you should not do this:

  • It is slow, caused the device to lock up when the crash happens for a few seconds
  • It requires your app to include symbols which increased the app size by 30-50% (on average)
  • You won't get line number information for your code.

You should instead symbolicate the crash reports using the dSYM, e.g. on your Mac.

Kerni
  • 15,241
  • 5
  • 36
  • 57
  • so lets suppose that i will do the symbolication server side using your Quincy lib si i will send the crash report, but : 1. can i get the file name where the crash happened ? 2. can i send addional information with the crash report ? – Mohamed Ghebaji Aug 29 '14 at 09:07
  • 1. Symbolication with the dSYM will give you the class, method, filename and line number if the correct dSYM is available. 2. As far as I remember there is a delegate to add extra information. Check the header files. – Kerni Aug 29 '14 at 09:10
  • ok. But when i looked to the ios example with the Quincy lib i noticed that it send the crash report in xml form and not the dsym file, so did i will get the class, method, filename and line number if use you lib server side ? – Mohamed Ghebaji Aug 29 '14 at 09:31
  • QuincyKit does not provide server side symbolication. You have to do this on your own Mac, see https://github.com/TheRealKerni/QuincyKit/wiki/Remote-symbolication – Kerni Aug 29 '14 at 09:52
  • let me clarify to you what i want to do : I have an ios application running in the device, i want when a crash happen the app send me the information about the crash (stack of crash, date, file name ....) so i used the PLCrashReporter to get all this information but the problem is that i can get the file name , method name and line number so i have two choice : 1. Symbolicate the crash report client side to get this info. 2 Symbolicate the crash report server side : are there is any way to do it ? thanks for all your reply – Mohamed Ghebaji Aug 29 '14 at 09:59
  • For QuincyKit related questions please use the Issue Tracker on Github. Commenting here in SO isn't meant for product specific discussions. If you have more commonly useful coding related questions, please start a new question instead. – Kerni Aug 29 '14 at 11:26