1. Passive

I mainly capture system exceptions, record and print abnormal logs and upload them to the background, usually using third-party statistical platforms (Umeng, Bugly, Google Analysis). The following are my ways to deal with crashes:

1. Logs collected by UmENG statistical platform

To facilitate fault locating, you are advised to compress the dSYM file that you have uploaded to the store into a ZIP file and upload the dSYM file to the UmU crash log and the symbol table of the corresponding version. Note: Each version must have a backup, or it will not be able to parse and locate problems.Copy the code

2, Logs collected by the Xcode tool (path :window->Organizer->Crashes)

Second, active

AvoidCrash prevention effectively intercepts a crash caused by abnormal data and uploads captured crash logs to your own server or a third-party statistics platform note: This type of library is temporarily closed for maintenance

Original link: github.com/chenfanfang…

VDM github.com/vipshop/VDM…

SafeKit github.com/JJMM/SafeKi…

1).JKDataHelper 2).NullSafe 3).YRClassSafeCategory 4). Remove NULL using AF network framework

Related links:

www.cnblogs.com/fengmin/p/8… www.jianshu.com/p/b6215e922… Blog.csdn.net/u010124617/… www.jianshu.com/p/5ce66c0a6… Github.com/nicklockwoo… Github.com/YueRuo/YRCl…

3, optimize

Clang Static code tool 1>.clang Static Analyzer Advantages: High integration with Xcode, easy to use, and command line support Disadvantages: incomplete oc check 2>.oclint Advantages: More check rules and customization, and tool integration 3>.infer Advantages: High efficiency and large scale] Supports incremental and breakdown analysis 4>.coverity 5>.deploymate checks Api compatibilityCopy the code

Each static scan tool has its own characteristics. You are advised to select or use it in combination with the size and complexity of the project code

Related links:

www.jianshu.com/p/b81a9f5bc… Testerhome.com/topics/9742 www.cocoachina.com/ios/2017080…

2). Memory Leak detection Tools Original Tools: Leak/Allocations of Xcode integration Instrument third party tools: 1>.mLeaksFinder 2>.pleaksniffer 3>.fbretainCycledetetorCopy the code

Results:

The PLeakSniffer simulator has a high probability of failing to detect a memory leak. MLeaksFinder mistakenly detects a large memory leak and uses FBRetainCycleDetetor(partially) to locate the circular reference path

A link to the

Wereadteam. Making. IO / 2016/02/22 /… Mrpeak. Cn/blog/leak/www.cocoachina.com/ios/2017010… Github.com/skyming/iOS…