Including custom data into iOS crash dumps

后端 未结 2 1505
一向
一向 2020-11-29 01:14

Hello Stack Overflow !

A simple question for you : is it possible to embed custom error data into automatically generated iOS crash dumps I get from my users when my

相关标签:
2条回答
  • 2020-11-29 01:58

    No, you cannot ad your own data into the crash reports. It is also not possible to access iOS generated crash reports automatically because of the sandbox.

    So my suggestion is as follows:

    1. For logging your own data, use Cocoalumberjack. It is much faster than NSLog or other logging frameworks out there and has an option to log your messages into a file. Now when an exception occurs, or whenever else you want to, log that into a file. But if your app crashes right at a point where you add something into a log file, it most likely will be missing, since the app crashed the very same moment.

      So its rather impossible to safely catch the exact SQL statement. But the crash report should give you enough information to understand what is happening, with the addition to what you logged of being done before. E.g. you could log the search string used in the SQL way before the SQL is being executed.

      In general try not to log too much.

    2. For catching crash report you should nothing else than a solution based on the open source framework PLCrashReporter, which can safely catch crashes, also when you app is already in the app store! Exception catching is not recommended, check this article to see why!

      iTunes Connect offers you to view some crash reports too, but it takes up to 2 weeks to see some, but by far not all as e.g. pointed out by the Camera+ developers. So you better use your own solution.

      PLCrashReporter will send you standard apple formatted crash reports, ready for symbolication, so you know where the crash happens in your code, including line numbers.

      Some solutions based on PLCrashReporter are:

      • QuincyKit: Open Source client + php server, basic crash grouping, symbolication can be automated from your mac (I am the developer of this)
      • HockeyApp: Paid service, uses QuincyKit client, advanced crash grouping, symbolication fully done on the server (I am on of the developers of this)
      • Bugsense: Free service, symbolication announced as premium feature
      • AppBlade: Paid service, symbolication unknown
      • Crashlytics: Private beta, unknown features, their solution seems to be based on PLCrashReporter
    3. The proposed solutions either allow sending the data automatically on the next startup or by asking the user if he/she agrees to send.

    0 讨论(0)
  • 2020-11-29 02:00

    Disclaimer-as-per-the-faq: I am a developer for AppBlade.

    AppBlade allows you to send custom parameters along with symbolicated crash reports as of December 2012.

    Check it out! http://blog.appblade.com/news/2012/12/appblade-sdk-update-sessions-and-queues/

    0 讨论(0)
提交回复
热议问题