Brief introduction
Founded in 2011, Crashlytic is a tool designed to store and analyze crash information for mobile app providers. Crashlytics users include: Payment tool PayPal, reviews app Yelp, photo sharing app Path, Groupon and other mobile apps.
In January 2013, Crashlytics was acquired by Twitter as another successful start-up product. After being acquired, we have more reason to use it to analyze the application crash information because there is no destabilizing factor for the start-up company.
The benefits of using Crashlytics are:
1, Crashlytics will not miss any application crash information. Take my app for example, you won't see any crash information in the background of itunes Connect. But users do respond to the crash using tweets or customer service calls. And these can be counted in the crashlytics. The following shows the differences between my app in the background and crashlytics of Apple itunes Connect:
2. Crashlytics can manage these crash logs as a bug management tool. For example, Crashlytics automatically sets priorities based on the frequency of each type of crash and the amount of users affected. For each type of crash,crashlytics, in addition to providing a call stack as a generic tool, there are more relevant information that can help diagnose, such as whether the device is jailbroken, the amount of memory at that time, the iOS version, and so on. For the repaired crash log, you can turn it off in the background of crashlytics. Shown is a crash record of my early app, and after I fix it, I update it to a repaired state.
3. Crashlytics can send crash information to your mailbox daily and weekly, all information at a glance.
Let me show you how to use Crashlytics.
Use the Introduction application account
Crashlytics Service is provided free of charge, but can not be directly registered to use, need to apply first, open the Crashlytic's official website, enter their own mailbox application use. As shown in the following:
After you have submitted your email address, your application will be placed in the Crashlytics application queue and the page should be redirected to the following screen. On the right side of this interface, you can provide more effective information to allow Crashlytics to prioritize your application and advise you to fill in more information about yourself.
If smooth, usually 1-2 days or so, you will receive crashlytics sent by the application through the mail, as shown, through the mail link to the registration screen, fill in the password to complete the registration.
Set up engineering
The original Xcode project needs to be configured before using Crashlytics, and at this point, crashlytics is more considerate than any other SDK provider I've ever seen. Because Crashlytics has done a Mac-side app to help you configure it, you need to download the app before you configure it.
After the app downloads, run the app and sign in to your account. Then select the "New App" button in the app, then select the project you want to add crashlytics to, then Crashlytics's app will prompt you to add a run Script for the project, and if you don't know how to add it, here's a helpful document. The project that was added after that is shown below
Next, Crashlytics's local app will prompt you to drag the Crashlytics related framework into the project. As shown below:
As soon as you are done, the last step is to add the following code to the Appdelegate Didfinishlaunchingwithoptions method:
#import <crashlytics/crashlytics.h>-(BOOL) Application: (UIApplication *) Application Didfinishlaunchingwithoptions: (nsdictionary *) launchoptions { [crashlytics startwithapikey:@ "Your identify code "];}
After that, run the program and Crashlytics will detect your Setup success. If you're interested, you can manually trigger a crash record to see if Crashlytics can help you collect it. You can use the following code
[[Crashlytics sharedinstance] crash];
If you want to test a crash caused by a exception, you can use the following code:
[NSObject Doesnotrecognizeselector]; [Arraywithonlytwoelements Objectatindex:3];
After the app is released, you can view and modify the related records in the crashlytics background. In addition, Crashlytics supports importing data into other project management tools, such as Redmine or Jira, as shown below, and is very simple to configure.
Principle of realization and realization of use experience
In principle, crashlytics through the following 2 steps to complete the crash log upload and analysis:
To provide the application SDK, you need to call its SDK to set up your app when the app starts. The SDK is integrated into your app to complete the collection and uploading of crash information.
Modify the compilation configuration of the project, add a piece of code, and upload the project's corresponding dSYM file each time you compile the project. Students who have studied manual analysis of crash logs should know that only through this file can the crash log be restored to a readable call stack message.
Usage Experience
To make it easier for developers to set up the appropriate project, Crashlytics provides a Mac-side application that helps you detect whether the project is set up correctly and provides the appropriate help information. Later I also found that the program will automatically help you upgrade the Crashlytics SDK files. Although this is very thoughtful, but I personally think it is not very friendly. Because after all, modifying the SDK will affect the application of the compiled internal logic, without any notification of the upgrade, I am not sure crashlytics have done bad things. However, foreign services, especially the relatively large-known companies such as Twitter provide services to be more moral integrity, so at this point I am more at ease.
Using Crashlytics can help you get rid of the hassle of managing app crash records. and help you identify some of the major hidden bugs in your app. For example, one of the apps I wrote earlier had a cache expiration issue that only triggers when the cache expires, which is difficult for testers to trigger because they can't understand the details of your application's internal implementation. Through the crashlytics, I clearly understand the number and location of application crash, combined with their own development experience, it is easy to find the problem.
It is worth mentioning that the official document of Crashlytics itself is also very sound, if you encounter any problems in the use, you can also go up to see the detailed documentation.
iOS development tools--tools for statistical crash Crashlytics